RE: [PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop conditions

2025-01-09 Thread Tamar Christina
Sent: Thursday, January 2, 2025 11:02 PM To: François Dumont ; Jonathan Wakely Cc: gcc-patches@gcc.gnu.org; nd ; libstd...@gcc.gnu.org Subject: RE: [PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop conditions Hi, > It means that we consider that hasher is not perfect, we have seve

RE: [PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop conditions

2025-01-02 Thread Tamar Christina
I’ll run the numbers with this change. Thanks, Tamar From: François Dumont Sent: Monday, December 30, 2024 5:08 PM To: Jonathan Wakely Cc: Tamar Christina ; gcc-patches@gcc.gnu.org; nd ; libstd...@gcc.gnu.org Subject: Re: [PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop condition

Re: [PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop conditions

2024-12-30 Thread François Dumont
Sorry to react so late on this patch. I'm only surprised by the expected result of the added __builtin_expect which is 0. It means that we consider that hasher is not perfect, we have several entries in the same bucket. Shouldn't we reward those that are spending time on their hasher to make it a

Re: [PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop conditions

2024-12-18 Thread Jonathan Wakely
On Wed, 18 Dec 2024 at 14:14, Tamar Christina wrote: > > > e791e52ec329277474f3218d8a44cd37ded14ac3..8101d868d0c5f7ac4f97931a > > > ffcf71d826c88094 100644 > > > > --- a/libstdc++-v3/include/bits/hashtable.h > > > > +++ b/libstdc++-v3/include/bits/hashtable.h > > > > @@ -2171,7 +2171,7 @@ _GLIBCXX

RE: [PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop conditions

2024-12-18 Thread Tamar Christina
> e791e52ec329277474f3218d8a44cd37ded14ac3..8101d868d0c5f7ac4f97931a > > ffcf71d826c88094 100644 > > > --- a/libstdc++-v3/include/bits/hashtable.h > > > +++ b/libstdc++-v3/include/bits/hashtable.h > > > @@ -2171,7 +2171,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > > if (this->_M_equals(__k,

RE: [PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop conditions

2024-12-17 Thread Tamar Christina
> On Fri, 13 Dec 2024 at 17:13, Tamar Christina wrote: > > > > Hi All, > > > > We are currently generating a loop which has more comparisons than you'd > > typically need as the probablities on the small size loop are such that it > > assumes the likely case is that an element is not found. > > >

Re: [PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop conditions

2024-12-13 Thread Jonathan Wakely
On Fri, 13 Dec 2024 at 17:13, Tamar Christina wrote: > > Hi All, > > We are currently generating a loop which has more comparisons than you'd > typically need as the probablities on the small size loop are such that it > assumes the likely case is that an element is not found. > > This again gener