From: Jonathan Wakely <jwakely@redhat.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] libstdc++/91223 Improve unordered containers == operator
Date: Thu, 16 Jan 2020 13:53:00 -0000 [thread overview]
Message-ID: <20200116132549.GQ60955@redhat.com> (raw)
In-Reply-To: <5f9063ac-030e-fd09-31cb-f384aaf7b5b4@gmail.com>
On 16/01/20 07:42 +0100, François Dumont wrote:
>On 1/15/20 10:52 PM, Jonathan Wakely wrote:
>>On 15/01/20 21:48 +0000, Jonathan Wakely wrote:
>>>On 14/01/20 22:25 +0100, François Dumont wrote:
>>>>On 1/13/20 10:53 PM, Jonathan Wakely wrote:
>>>>>On 13/01/20 22:41 +0100, François Dumont wrote:
>>>>>>
>>>>>>For the multi-keys we could still avoid redundant
>>>>>>comparisons when _Equal is just doing == on the key type. On
>>>>>>unordered_multiset we could just avoids the call to
>>>>>>is_permuation and on the unordered_multimap we could check
>>>>>>the is_permutation only on the associated value rather than
>>>>>>on the std::pair.
>>>>>>
>>>>>I don't think that's necessary, or helpful.
>>>>>
>>>>>The idea of https://gcc.gnu.org/ml/libstdc++/2020-01/msg00070.html is
>>>>>that you shouldn't be using _Equal at all, and therefore it doesn't
>>>>>matter whether it's std::equal_to or not.
>>>>>
>>>>>
>>>>And it was indeed possible.
>>>
>>>Nice!
>>>
>>>> PR libstdc++/91223
>>>> * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
>>>> * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
>>>> (_Equality_base): Remove.
>>>> (_Equality<>::_M_equal): Review implementation. Use
>>>>std::is_permutation.
>>>> * testsuite/23_containers/unordered_multiset/operators/1.cc
>>>> (Hash, Equal, test02, test03): New.
>>>> * testsuite/23_containers/unordered_set/operators/1.cc
>>>> (Hash, Equal, test02, test03): New.
>>>>
>>>>Tested under Linux x86_64.
>>>>
>>>>Ok to commit ?
>>>
>>>Yes, OK for trunk (we're in stage4 but your patch was posted in stage3
>>>and fixes a pretty nasty performance bug, so is OK now).
>>>
>>>N.B. GCC has moved to Git instead of Subversion. If you don't have Git
>>>access set up let me know and I can commit the patch for you.
>
>I haven't done the move yet and won't be able to do it before the
>week-end. So please proceed to the commit for me, thanks.
No problem, I can do that.
next prev parent reply other threads:[~2020-01-16 13:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 17:58 François Dumont
2020-01-10 22:10 ` Jonathan Wakely
2020-01-10 22:31 ` Jonathan Wakely
2020-01-13 22:01 ` François Dumont
2020-01-13 22:56 ` Jonathan Wakely
2020-01-14 21:52 ` François Dumont
2020-01-15 22:27 ` Jonathan Wakely
2020-01-15 22:32 ` Jonathan Wakely
2020-01-16 7:38 ` François Dumont
2020-01-16 13:53 ` Jonathan Wakely [this message]
2020-01-16 16:05 ` Jonathan Wakely
2020-01-16 22:39 ` François Dumont
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=20200116132549.GQ60955@redhat.com \
--to=jwakely@redhat.com \
--cc=frs.dumont@gmail.com \
--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).