This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51386] [4.7 Regression]: 23_containers/unordered_set/hash_policy/load_factor.cc execution timeout
- From: "fdumont at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 05 Dec 2011 20:55:59 +0000
- Subject: [Bug libstdc++/51386] [4.7 Regression]: 23_containers/unordered_set/hash_policy/load_factor.cc execution timeout
- Auto-submitted: auto-generated
- References: <bug-51386-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51386
--- Comment #7 from FranÃois Dumont <fdumont at gcc dot gnu.org> 2011-12-05 20:55:59 UTC ---
The problem is in the hash policy, while computing _M_prev_resize the max load
factor is not always considered. The result is that when max load factor is
lower than 1 the hashtable is rehashed almost each time we insert a new
element.
I have submitted a patch on mailing list and wait for its approval. Sorry for
the inconvenience.
Note that memory was not really a suspect cause the hash code is not put in
cache for integral types like the int used in the test.