[0/2] Optimize is_unbounded_array trait performance

Message ID 20230911221328.26133-1-kmatsui@gcc.gnu.org
Headers
Series Optimize is_unbounded_array trait performance |

Message

Ken Matsui Sept. 11, 2023, 10:11 p.m. UTC
  This patch series optimizes is_unbounded_array trait
performance. The first patch implements __is_unbounded_array
built-in trait. The second patch optimizes is_unbounded_array
trait performance by using __is_unbounded_array built-in trait
if available.

The performance improvement is shown in the following benchmark:

https://github.com/ken-matsui/gsoc23/blob/main/is_unbounded_array_v.md#mon-sep-11-030125-pm-pdt-2023

Time: -2.79908%
Peak Memory Usage: -1.11666%
Total Memory Usage: -2.48356%

Ken Matsui (2):
  c++: Implement __is_unbounded_array built-in trait
  libstdc++: Optimize is_unbounded_array trait performance

 gcc/cp/constraint.cc                          |  3 ++
 gcc/cp/cp-trait.def                           |  1 +
 gcc/cp/semantics.cc                           |  4 ++
 gcc/testsuite/g++.dg/ext/has-builtin-1.C      |  3 ++
 gcc/testsuite/g++.dg/ext/is_unbounded_array.C | 37 +++++++++++++++++++
 libstdc++-v3/include/std/type_traits          |  5 +++
 6 files changed, 53 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/ext/is_unbounded_array.C