You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, thank you for the library and the benchmarks!
I think it would be useful to provide hash specializations for std::pair and std::tuple.
Those don't exist in the standard but some other hash map implementations like absl provide them.
This would be really convenient as people won't have to rely on implementing their own, especially having to combine the hashes.
This is how I have done it below.
It would be nice to have struct ankerl::unordered_dense::hash<std::pair<T1, T2>> and struct ankerl::unordered_dense::hash<std::tuple<Ts...>> as part of the implementation in unordered_dense.h
I am not sure if my implementation of void hash_combine(size_t& seed, T const& v) is optimal or if you can come up with something better suited for wyhash
Hi @odygrd, thanks for the code examples! I played a bit with the implementation, and now think it's really worthwhile to have implementations for these available. Creating a high performance & high quality hash for tuple is not trivial. I think I've got a good implementation now though, I'll release it as 4.3.0
Hello, thank you for the library and the benchmarks!
I think it would be useful to provide
hash
specializations forstd::pair
andstd::tuple
.Those don't exist in the standard but some other hash map implementations like
absl
provide them.This would be really convenient as people won't have to rely on implementing their own, especially having to combine the hashes.
This is how I have done it below.
It would be nice to have
struct ankerl::unordered_dense::hash<std::pair<T1, T2>>
andstruct ankerl::unordered_dense::hash<std::tuple<Ts...>>
as part of the implementation inunordered_dense.h
I am not sure if my implementation of
void hash_combine(size_t& seed, T const& v)
is optimal or if you can come up with something better suited forwyhash
The text was updated successfully, but these errors were encountered: