PR 54075 Restore 4.6 growth factor

Jonathan Wakely jwakely.gcc@gmail.com
Sun Jul 29 17:15:00 GMT 2012


Please remember to CC gcc-patches too.

On 28 July 2012 21:49, François Dumont wrote:
> Hi
>
>     Here is the patch to restore the 4.6 growth factor of 2. I prefer to
> validate the restored behavior by adding a performance test. Without the
> patch the result was:
>
> unordered_set.cc             unordered_set 10000000 insertions  403r  329u
> 73s 402825280mem    0pf
>
> after the patch:
>
> unordered_set.cc             unordered_set 10000000 insertions  112r   86u
> 25s 402825104mem    0pf
>
> It validates the 3x times performance hint.
>
> Tested under Linux x86_64.
>
> 2012-07-28  François Dumont  <fdumont@gcc.gnu.org>
>
>     PR libstdc++/54075
>     * include/bits/hashtable_policy.h
>     (_Prime_rehash_policy::_M_next_bkt): Add a growth factor set to 2
>     to boost growth in the number of buckets.
>     * testsuite/performance/23_containers/insert/unordered_set.cc: New.
>
> Even if it is not a Standard conformity issue I think we can apply it to the
> 4.7 branch too.

Yes, it's a performance regression, so this is OK for trunk and 4.7, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hash_policy.patch
Type: text/x-patch
Size: 3852 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20120729/20a72d53/attachment.bin>


More information about the Libstdc++ mailing list