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/2] Optimize is_member_pointer trait performance
Date: Mon, 11 Sep 2023 21:26:17 -0700 [thread overview]
Message-ID: <20230912044638.14504-1-kmatsui@gcc.gnu.org> (raw)
This patch series optimizes is_member_pointer trait
performance. The first patch implements __is_member_pointer
built-in trait. The second patch optimizes is_member_pointer
trait performance by using __is_member_pointer built-in trait
if available.
The performance improvement is shown in the following benchmark:
https://github.com/ken-matsui/gsoc23/blob/main/is_member_pointer_v.md#mon-sep-11-092927-pm-pdt-2023
Time: -47.2037% +/- 2.12936%
Peak Memory Usage: -39.4183% +/- 0.00217276%
Total Memory Usage: -41.9905% +/- 0%
Ken Matsui (2):
c++: Implement __is_member_pointer built-in trait
libstdc++: Optimize is_member_pointer 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_member_pointer.C | 30 ++++++++++++++++++++
libstdc++-v3/include/std/type_traits | 16 ++++++++++-
6 files changed, 56 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/g++.dg/ext/is_member_pointer.C
--
2.42.0
next reply other threads:[~2023-09-12 4:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 4:26 Ken Matsui [this message]
2023-09-12 4:26 ` [PATCH 1/2] c++: Implement __is_member_pointer built-in trait Ken Matsui
2023-09-12 4:26 ` [PATCH 2/2] libstdc++: Optimize is_member_pointer trait 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=20230912044638.14504-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).