PR 51386

François Dumont frs.dumont@gmail.com
Mon Dec 5 20:46:00 GMT 2011


Hi

     The issue was on the hash policy, the result was that when max load 
factor was lower than 1 the hashtable keeps on being rehashed on each 
insertion, rather bad for performance. I took this opportunity to review 
a little bit the _M_next_bkt implementation and to add comments.

     Tested under linux x86_64, load_factor test is much faster now.

2011-12-05  François Dumont <fdumont@gcc.gnu.org>

         PR 51386
         * include/bits/hashtable_policy.h 
(_Prime_rehash_policy::_M_next_bkt):
         Fix computation of _M_prev_resize so that hashtable do not keep on
         being rehashed when _M_max_load_factor is lower than 1.

Ok to commit ?

François


On 12/04/2011 11:44 AM, Paolo Carlini wrote:
> Hi,
>
> just wanted to make sure you noticed the messages from Bugzilla about 
> this PR:
>
>     http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51386
>
> The issue seems rather urgent.
>
> Thanks,
> Paolo.
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hashtable_policy.patch
Type: text/x-patch
Size: 2260 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20111205/953428d9/attachment.bin>


More information about the Libstdc++ mailing list