[Bug libstdc++/54075] [4.7.1] unordered_map insert still slower than 4.6.2

François Dumont frs.dumont@gmail.com
Wed Nov 7 22:02:00 GMT 2012


Here is the patch to fix the redundant rehash/reserve issue.

2012-11-07  François Dumont  <fdumont@gcc.gnu.org>

     PR libstdc++/54075
     * include/bits/hashtable.h (_Hashtable<>::rehash): Reset hash
     policy state if no rehash.
     * testsuite/23_containers/unordered_set/modifiers/reserve.cc
     (test02): New.

I had prepared and tested it in 4.7 branch but I can apply the same on 
trunk.

Ok to commit ? If so, where ?

François

On 11/06/2012 10:33 PM, paolo.carlini at oracle dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54075
>
> --- Comment #39 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-06 21:33:57 UTC ---
> Ok thanks. I guess depending on the complexity of the fixes we can apply some
> only to mainline first and reconsider the 4_7 branch later. Please do your best
> to work on both issues: we just entered Stage 3 thus no new features from now
> on, we are all concentrated on bug fixes until the release.
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hashtable_rehash.patch
Type: text/x-patch
Size: 1231 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20121107/c10574b7/attachment.bin>


More information about the Libstdc++ mailing list