From: Patrick Palka <ppalka@redhat.com>
To: Ken Matsui <kmatsui@gcc.gnu.org>
Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Re: [PATCH v2 4/4] libstdc++: Optimize std::remove_extent compilation performance
Date: Wed, 14 Feb 2024 15:21:13 -0500 (EST) [thread overview]
Message-ID: <afcd8c6c-c5c6-4730-0bc5-d706015d99d8@idea> (raw)
In-Reply-To: <20240214135252.1416047-4-kmatsui@gcc.gnu.org>
On Wed, 14 Feb 2024, Ken Matsui wrote:
> This patch optimizes the compilation performance of std::remove_extent
> by dispatching to the new __remove_extent built-in trait.
>
> libstdc++-v3/ChangeLog:
>
> * include/std/type_traits (remove_extent): Use __remove_extent
> built-in trait.
LGTM
>
> Signed-off-by: Ken Matsui <kmatsui@gcc.gnu.org>
> ---
> libstdc++-v3/include/std/type_traits | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
> index 3bde7cb8ba3..0fb1762186c 100644
> --- a/libstdc++-v3/include/std/type_traits
> +++ b/libstdc++-v3/include/std/type_traits
> @@ -2064,6 +2064,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> // Array modifications.
>
> /// remove_extent
> +#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_extent)
> + template<typename _Tp>
> + struct remove_extent
> + { using type = __remove_extent(_Tp); };
> +#else
> template<typename _Tp>
> struct remove_extent
> { using type = _Tp; };
> @@ -2075,6 +2080,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> template<typename _Tp>
> struct remove_extent<_Tp[]>
> { using type = _Tp; };
> +#endif
>
> /// remove_all_extents
> template<typename _Tp>
> --
> 2.43.0
>
>
next prev parent reply other threads:[~2024-02-14 20:21 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 11:44 [PATCH 1/2] c++: Implement __add_pointer built-in trait Ken Matsui
2024-02-14 11:44 ` [PATCH 2/2] libstdc++: Optimize std::add_pointer compilation performance Ken Matsui
2024-02-14 13:52 ` [PATCH v2 1/4] c++: Implement __add_pointer built-in trait Ken Matsui
2024-02-14 13:52 ` [PATCH v2 2/4] libstdc++: Optimize std::add_pointer compilation performance Ken Matsui
2024-02-14 20:20 ` Patrick Palka
2024-02-14 13:52 ` [PATCH v2 3/4] c++: Implement __remove_extent built-in trait Ken Matsui
2024-02-14 20:20 ` Patrick Palka
2024-02-14 13:52 ` [PATCH v2 4/4] libstdc++: Optimize std::remove_extent compilation performance Ken Matsui
2024-02-14 20:21 ` Patrick Palka [this message]
2024-02-14 20:18 ` [PATCH v2 1/4] c++: Implement __add_pointer built-in trait Patrick Palka
2024-02-15 4:17 ` Ken Matsui
2024-02-15 4:52 ` [PATCH v3 " Ken Matsui
2024-02-15 12:48 ` [PATCH v4 05/12] c++: Implement __remove_all_extents " Ken Matsui
2024-02-15 12:48 ` [PATCH v4 06/12] libstdc++: Optimize std::remove_all_extents compilation performance Ken Matsui
2024-02-15 12:48 ` [PATCH v4 07/12] c++: Implement __add_lvalue_reference built-in trait Ken Matsui
2024-02-15 12:48 ` [PATCH v4 08/12] libstdc++: Optimize std::add_lvalue_reference compilation performance Ken Matsui
2024-02-15 12:48 ` [PATCH v4 09/12] c++: Implement __add_rvalue_reference built-in trait Ken Matsui
2024-02-15 12:48 ` [PATCH v4 10/12] libstdc++: Optimize std::add_rvalue_reference compilation performance Ken Matsui
2024-02-15 12:48 ` [PATCH v4 11/12] c++: Implement __decay built-in trait Ken Matsui
2024-02-15 12:48 ` [PATCH v4 12/12] libstdc++: Optimize std::decay compilation performance Ken Matsui
2024-02-15 15:20 ` [PATCH v5 01/14] c++: Implement __add_pointer built-in trait Ken Matsui
2024-02-15 15:20 ` [PATCH v5 02/14] libstdc++: Optimize std::add_pointer compilation performance Ken Matsui
2024-02-15 15:20 ` [PATCH v5 03/14] c++: Implement __remove_extent built-in trait Ken Matsui
2024-02-15 15:20 ` [PATCH v5 04/14] libstdc++: Optimize std::remove_extent compilation performance Ken Matsui
2024-02-15 15:20 ` [PATCH v5 05/14] c++: Implement __remove_all_extents built-in trait Ken Matsui
2024-02-15 15:20 ` [PATCH v5 06/14] libstdc++: Optimize std::remove_all_extents compilation performance Ken Matsui
2024-02-15 15:20 ` [PATCH v5 07/14] c++: Implement __add_lvalue_reference built-in trait Ken Matsui
2024-02-15 15:20 ` [PATCH v5 08/14] libstdc++: Optimize std::add_lvalue_reference compilation performance Ken Matsui
2024-02-15 15:20 ` [PATCH v5 09/14] c++: Implement __add_rvalue_reference built-in trait Ken Matsui
2024-02-15 15:20 ` [PATCH v5 10/14] libstdc++: Optimize std::add_rvalue_reference compilation performance Ken Matsui
2024-02-15 15:20 ` [PATCH v5 11/14] c++: Implement __decay built-in trait Ken Matsui
2024-02-15 15:20 ` [PATCH v5 12/14] libstdc++: Optimize std::decay compilation performance Ken Matsui
2024-02-15 15:20 ` [PATCH v5 13/14] c++: Implement __rank built-in trait Ken Matsui
2024-02-15 21:48 ` Patrick Palka
2024-02-16 2:14 ` Ken Matsui
2024-02-16 2:22 ` Ken Matsui
2024-02-16 2:15 ` [PATCH v6 " Ken Matsui
2024-02-15 15:20 ` [PATCH v5 14/14] libstdc++: Optimize std::rank 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=afcd8c6c-c5c6-4730-0bc5-d706015d99d8@idea \
--to=ppalka@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kmatsui@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).