aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authorFrançois Dumont <fdumont@gcc.gnu.org>2021-10-25 15:59:35 +0200
committerFrançois Dumont <fdumont@gcc.gnu.org>2021-11-15 18:52:07 +0100
commitd10b863fa3de8b202aadbdef1b012188ab0868d8 (patch)
tree6f4311493baaa5509b1c2abe64dee5874baa1fe7 /gcc/gimple-fold.c
parentf861ed8b29a5eb6164d1ddbcfbb6232dddae713f (diff)
downloadgcc-d10b863fa3de8b202aadbdef1b012188ab0868d8.zip
gcc-d10b863fa3de8b202aadbdef1b012188ab0868d8.tar.gz
gcc-d10b863fa3de8b202aadbdef1b012188ab0868d8.tar.bz2
libstdc++: Unordered containers merge re-use hash code
When merging 2 unordered containers with same hasher we can re-use the hash code from the cache if any. Also in the context of the merge operation on multi-container use previous insert iterator as a hint for the next insert. libstdc++-v3/ChangeLog: * include/bits/hashtable_policy.h: (_Hash_code_base<>::_M_hash_code(const _Hash&, const _Hash_node_value<_Value, true>&)): New. (_Hash_code_base<>::_M_hash_code<_H2>(const _H2&, const _Hash_node_value<>&)): New. * include/bits/hashtable.h (_Hashtable<>::_M_merge_unique): Use latter. (_Hashtable<>::_M_merge_multi): Likewise. * testsuite/23_containers/unordered_multiset/modifiers/merge.cc (test05): New test. * testsuite/23_containers/unordered_set/modifiers/merge.cc (test04): New test.
Diffstat (limited to 'gcc/gimple-fold.c')
0 files changed, 0 insertions, 0 deletions