public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Optimize more type traits
@ 2023-12-23 21:20 Ken Matsui
  2023-12-23 21:20 ` [PATCH 1/8] c++: Implement __is_const built-in trait Ken Matsui
  2023-12-23 21:20 ` [PATCH 2/8] libstdc++: Optimize std::is_const compilation performance Ken Matsui
  0 siblings, 2 replies; 4+ messages in thread
From: Ken Matsui @ 2023-12-23 21:20 UTC (permalink / raw)
  To: gcc-patches; +Cc: libstdc++, Ken Matsui

This patch series implements __is_const, __is_volatile, __is_pointer,
and __is_unbounded_array built-in traits, which were isolated from my
previous patch series "Optimize type traits compilation performance"
because they contained performance regression.  I confirmed that this
patch series does not cause any performance regression.  The main reason
of the performance regression were the exhaustiveness of the benchmarks
and the instability of the benchmark results.  Here are new benchmark
results:

is_const: https://github.com/ken-matsui/gcc-bench/blob/main/is_const.md#sat-dec-23-090605-am-pst-2023

time: -4.36603%, peak memory: -0.300891%, total memory: -0.247934%

is_volatile_v: https://github.com/ken-matsui/gcc-bench/blob/main/is_volatile_v.md#sat-dec-23-091518-am-pst-2023

time: -4.06816%, peak memory: -0.609298%, total memory: -0.659134%

is_pointer: https://github.com/ken-matsui/gcc-bench/blob/main/is_pointer.md#sat-dec-23-124903-pm-pst-2023

time: -2.47124%, peak memory: -2.98207%, total memory: -4.0811%

is_unbounded_array_v: https://github.com/ken-matsui/gcc-bench/blob/main/is_unbounded_array_v.md#sat-dec-23-010046-pm-pst-2023

time: -1.50025%, peak memory: -1.07386%, total memory: -2.32394%

Ken Matsui (8):
  c++: Implement __is_const built-in trait
  libstdc++: Optimize std::is_const compilation performance
  c++: Implement __is_volatile built-in trait
  libstdc++: Optimize std::is_volatile compilation performance
  c++: Implement __is_pointer built-in trait
  libstdc++: Optimize std::is_pointer compilation performance
  c++: Implement __is_unbounded_array built-in trait
  libstdc++: Optimize std::is_unbounded_array compilation performance

 gcc/cp/constraint.cc                          | 12 +++
 gcc/cp/cp-trait.def                           |  4 +
 gcc/cp/semantics.cc                           | 16 ++++
 gcc/testsuite/g++.dg/ext/has-builtin-1.C      | 12 +++
 gcc/testsuite/g++.dg/ext/is_const.C           | 19 +++++
 gcc/testsuite/g++.dg/ext/is_pointer.C         | 51 +++++++++++++
 gcc/testsuite/g++.dg/ext/is_unbounded_array.C | 37 ++++++++++
 gcc/testsuite/g++.dg/ext/is_volatile.C        | 19 +++++
 libstdc++-v3/include/bits/cpp_type_traits.h   | 29 ++++++++
 libstdc++-v3/include/std/type_traits          | 73 +++++++++++++++++--
 10 files changed, 264 insertions(+), 8 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/ext/is_const.C
 create mode 100644 gcc/testsuite/g++.dg/ext/is_pointer.C
 create mode 100644 gcc/testsuite/g++.dg/ext/is_unbounded_array.C
 create mode 100644 gcc/testsuite/g++.dg/ext/is_volatile.C

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-23 21:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-23 21:20 [PATCH 0/8] Optimize more type traits Ken Matsui
2023-12-23 21:20 ` [PATCH 1/8] c++: Implement __is_const built-in trait Ken Matsui
2023-12-23 21:38   ` Ken Matsui
2023-12-23 21:20 ` [PATCH 2/8] libstdc++: Optimize std::is_const compilation performance Ken Matsui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).