[Bug libstdc++/106275] unordered_map with std::string key, std::hash<std::string>, and custom equality predicate weirdness
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 12 23:00:10 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106275
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This "bug" (i.e. doing a linear search for small containers using slow hash
functions) makes the find operation more than twice as fast:
BM_std_hash 4.67 ns 4.66 ns 150610579
BM_custom_hash 12.0 ns 12.0 ns 57529241
See PR 68303 for more details.
More information about the Gcc-bugs
mailing list