gcc/libstdc++-v3/include
François Dumont d10b863fa3 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.
2021-11-15 18:52:07 +01:00
..
backward Update copyright years. 2021-01-04 10:26:59 +01:00
bits libstdc++: Unordered containers merge re-use hash code 2021-11-15 18:52:07 +01:00
c Update copyright years. 2021-01-04 10:26:59 +01:00
c_compatibility Update copyright years. 2021-01-04 10:26:59 +01:00
c_global libstdc++: Enable type traits for wchar_t unconditionally [PR98725] 2021-10-09 00:57:49 +01:00
c_std Update copyright years. 2021-01-04 10:26:59 +01:00
debug libstdc++: [_GLIBCXX_DEBUG] Remove _Safe_container<>::_M_safe() 2021-11-14 21:55:01 +01:00
decimal libstdc++: Fix doxygen markup for group close commands 2021-04-06 16:43:24 +01:00
experimental c++: check constexpr constructor body 2021-11-15 02:50:45 -05:00
ext libstdc++: Enable vstring for wchar_t unconditionally [PR98725] 2021-10-09 00:57:49 +01:00
parallel Update copyright years. 2021-01-04 10:26:59 +01:00
precompiled libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00
pstl libstdc++: Fix up parallel_backend_serial.h [PR97549] 2021-02-23 09:28:14 +01:00
std libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00
tr1 libstdc++: Enable type traits for wchar_t unconditionally [PR98725] 2021-10-09 00:57:49 +01:00
tr2 libstdc++: Fix doxygen markup for group close commands 2021-04-06 16:43:24 +01:00
Makefile.am libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00
Makefile.in libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00