public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Optimize is_scoped_enum trait performance
@ 2023-09-12  0:16 Ken Matsui
  2023-09-12  0:16 ` [PATCH 1/2] c++: Implement __is_scoped_enum built-in trait Ken Matsui
  2023-09-12  0:16 ` [PATCH 2/2] libstdc++: Optimize is_scoped_enum trait performance Ken Matsui
  0 siblings, 2 replies; 4+ messages in thread
From: Ken Matsui @ 2023-09-12  0:16 UTC (permalink / raw)
  To: gcc-patches; +Cc: libstdc++, Ken Matsui

This patch series optimizes is_scoped_enum trait
performance. The first patch implements __is_scoped_enum
built-in trait. The second patch optimizes is_scoped_enum
trait performance by using __is_scoped_enum built-in trait
if available.

The performance improvement is shown in the following benchmark:

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

Time: -32.717% +/- 1.67315%
Peak Memory Usage: -17.3805% +/- 0.00931763%
Total Memory Usage: -19.0881% +/- 0%

Ken Matsui (2):
  c++: Implement __is_scoped_enum built-in trait
  libstdc++: Optimize is_scoped_enum 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_scoped_enum.C | 67 +++++++++++++++++++++++
 libstdc++-v3/include/std/type_traits      | 12 ++++
 6 files changed, 90 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/ext/is_scoped_enum.C

-- 
2.42.0


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

end of thread, other threads:[~2023-09-12  6:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12  0:16 [PATCH 0/2] Optimize is_scoped_enum trait performance Ken Matsui
2023-09-12  0:16 ` [PATCH 1/2] c++: Implement __is_scoped_enum built-in trait Ken Matsui
2023-09-12  0:16 ` [PATCH 2/2] libstdc++: Optimize is_scoped_enum trait performance Ken Matsui
2023-09-12  6:50   ` Jonathan Wakely

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).