]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/reserve.cc
re PR libstdc++/54075 ([4.7.1] unordered_map insert still slower than 4.6.2)
authorFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 25 Jul 2012 19:32:48 +0000 (19:32 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 25 Jul 2012 19:32:48 +0000 (19:32 +0000)
commit2514d7f1ffa6049efcf198c373c4d13cef266b03
tree68aefb11e267b8b894dec8ab1bc6c6da96a9fae8
parent933a2c39fd3778d46305894d55fca0dd584acefa
re PR libstdc++/54075 ([4.7.1] unordered_map insert still slower than 4.6.2)

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

PR libstdc++/54075
* include/bits/hashtable.h
(_Hashtable<>::_Hashtable(_InputIterator, _InputIterator,
size_type, ...): Remove std::max usage to guarantee that hashtable
state is consistent with hash policy state.
(_Hashtable<>::rehash): Likewise. Set _M_prev_resize to 0 to avoid
the hashtable to be shrinking on next insertion.
* testsuite/23_containers/unordered_set/modifiers/reserve.cc: New.
* testsuite/23_containers/unordered_multiset/modifiers/reserve.cc: New.
* testsuite/23_containers/unordered_map/modifiers/reserve.cc: New.
* testsuite/23_containers/unordered_multimap/modifiers/reserve.cc: New.

From-SVN: r189863
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable.h
libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/reserve.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/modifiers/reserve.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/modifiers/reserve.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc [new file with mode: 0644]