OSDN Git Service

2011-11-23 Fran├žois Dumont <fdumont@gcc.gnu.org>
authorfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Nov 2011 20:30:18 +0000 (20:30 +0000)
committerfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Nov 2011 20:30:18 +0000 (20:30 +0000)
commitcd8960cc29aedf7e5489f382a04b4e892632a83a
treed6dfde4f6c17389a68c277fe5c1e37490b857508
parent96bfcca525938616bde2b709f93756d721f33220
2011-11-23  Fran├žois Dumont <fdumont@gcc.gnu.org>

PR libstdc++/41975
* include/bits/hashtable.h (_Hashtable<>): Major data model
modification to limit performance impact of empty buckets in
erase(iterator) implementation.
* include/bits/hashtable_policy.h (_Hashtable_iterator,
_Hashtable_const_iterator): Remove not used anymore.
* include/bits/hashtable_policy.h (_Prime_rehash_policy): Remove
_M_grow_factor, just use natural evolution of prime numbers. Add
_M_prev_size to know when the number of buckets can be reduced.
* include/bits/unordered_set.h (__unordered_set<>,
__unordered_multiset<>), unordered_map.h (__unordered_map<>,
__unordered_multimap<>): Change default value of cache hash code
template parameter, false for integral types with noexcept hash
functor, true otherwise.
* include/debug/unordered_map, unordered_set: Adapt transformation
from iterator/const_iterator to respectively
local_iterator/const_local_iterator.
* testsuite/performance/23_containers/copy_construct/unordered_set.cc:
New.
* testsuite/23_containers/unordered_set/instantiation_neg.cc: New.
* testsuite/23_containers/unordered_set/hash_policy/rehash.cc: New.
* testsuite/23_containers/unordered_multiset/cons/copy.cc: New.
* testsuite/23_containers/unordered_multiset/erase/1.cc,
24061-multiset.cc: Add checks on the number of bucket elements.
* testsuite/23_containers/unordered_multiset/insert/multiset_range.cc,
multiset_single.cc, multiset_single_move.cc: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181677 138bc75d-0d04-0410-961f-82ee72b054a4
16 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable.h
libstdc++-v3/include/bits/hashtable_policy.h
libstdc++-v3/include/bits/unordered_map.h
libstdc++-v3/include/bits/unordered_set.h
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/include/debug/unordered_set
libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/copy.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc
libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/24061-multiset.cc
libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/multiset_range.cc
libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/multiset_single.cc
libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/multiset_single_move.cc
libstdc++-v3/testsuite/23_containers/unordered_set/hash_policy/rehash.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/performance/23_containers/copy_construct/unordered_set.cc [new file with mode: 0644]