This patch series optimizes is_bounded_array trait performance. The first patch implements __is_bounded_array built-in trait. The second patch optimizes is_bounded_array trait performance by using __is_bounded_array built-in trait if available.
The performance improvement is shown in the following benchmark: https://github.com/ken-matsui/gsoc23/blob/main/is_bounded_array_v.md#mon-sep-11-072608-pm-pdt-2023 Time: Peak Memory Usage: Total Memory Usage: Ken Matsui (2): c++: Implement __is_bounded_array built-in trait libstdc++: Optimize is_bounded_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_bounded_array.C | 38 +++++++++++++++++++++ libstdc++-v3/include/std/type_traits | 5 +++ 6 files changed, 54 insertions(+) create mode 100644 gcc/testsuite/g++.dg/ext/is_bounded_array.C -- 2.42.0