Re: New power of 2 hash policy

2015-10-19 Thread François Dumont
Is this one ok ? François On 28/09/2015 21:16, François Dumont wrote: > On 25/09/2015 15:28, Jonathan Wakely wrote: >> @@ -501,6 +503,129 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >>> mutable std::size_t_M_next_resize; >>> }; >>> >>> + /// Range hashing function considering that second

Re: New power of 2 hash policy

2015-09-28 Thread François Dumont
On 25/09/2015 15:28, Jonathan Wakely wrote: > @@ -501,6 +503,129 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >> mutable std::size_t_M_next_resize; >> }; >> >> + /// Range hashing function considering that second args is a power >> of 2. > > Does this mean "assuming" not "considering"? I assume

Re: New power of 2 hash policy

2015-09-25 Thread Jonathan Wakely
On 24/09/15 22:08 +0200, François Dumont wrote: Working on it I realised that despite the comment on _M_next_bkt saying "no smaller than n" the method can return a value smaller for big n values. This is not likely to happen but I prefer to take care of it. I just make sure we won't try to

Re: New power of 2 hash policy

2015-09-24 Thread François Dumont
On 11/09/2015 15:23, Jonathan Wakely wrote: > On 11/09/15 14:18 +0100, Jonathan Wakely wrote: >> On 11/09/15 15:11 +0200, Michael Matz wrote: >>> Hi, >>> >>> On Thu, 10 Sep 2015, François Dumont wrote: >>> Here is a patch to offer an alternative hash policy. This one is using power of

Re: New power of 2 hash policy

2015-09-13 Thread François Dumont
On 11/09/2015 15:23, Jonathan Wakely wrote: > On 11/09/15 14:18 +0100, Jonathan Wakely wrote: >> On 11/09/15 15:11 +0200, Michael Matz wrote: >>> Hi, >>> >>> On Thu, 10 Sep 2015, François Dumont wrote: >>> Here is a patch to offer an alternative hash policy. This one is using power of

Re: New power of 2 hash policy

2015-09-11 Thread Michael Matz
Hi, On Thu, 10 Sep 2015, François Dumont wrote: > Here is a patch to offer an alternative hash policy. This one is > using power of 2 number of buckets allowing a faster modulo operation. > This is obvious when running the performance test that I have adapted to > use this alternative

Re: New power of 2 hash policy

2015-09-11 Thread Jonathan Wakely
On 11/09/15 15:11 +0200, Michael Matz wrote: Hi, On Thu, 10 Sep 2015, François Dumont wrote: Here is a patch to offer an alternative hash policy. This one is using power of 2 number of buckets allowing a faster modulo operation. This is obvious when running the performance test that I

Re: New power of 2 hash policy

2015-09-11 Thread Jonathan Wakely
On 11/09/15 14:18 +0100, Jonathan Wakely wrote: On 11/09/15 15:11 +0200, Michael Matz wrote: Hi, On Thu, 10 Sep 2015, François Dumont wrote: Here is a patch to offer an alternative hash policy. This one is using power of 2 number of buckets allowing a faster modulo operation. This is

New power of 2 hash policy

2015-09-10 Thread François Dumont
Hi Here is a patch to offer an alternative hash policy. This one is using power of 2 number of buckets allowing a faster modulo operation. This is obvious when running the performance test that I have adapted to use this alternative policy. Something between current implementation and the tr1