From: Ken Matsui <kmatsui@gcc.gnu.org>
To: gcc-patches@gcc.gnu.org
Cc: libstdc++@gcc.gnu.org, Ken Matsui <kmatsui@gcc.gnu.org>
Subject: [PATCH 0/8] Optimize more type traits
Date: Sat, 23 Dec 2023 13:20:25 -0800 [thread overview]
Message-ID: <20231223213542.448971-1-kmatsui@gcc.gnu.org> (raw)
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
next reply other threads:[~2023-12-23 21:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-23 21:20 Ken Matsui [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231223213542.448971-1-kmatsui@gcc.gnu.org \
--to=kmatsui@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).