martinus / robin-hood-hashing

Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20
https://gitter.im/martinus/robin-hood-hashing
MIT License
1.5k stars 142 forks source link

max_load_factor compatible #85

Closed ktprime closed 3 years ago

ktprime commented 3 years ago

changed flollows can compatible with std::unordered_map. float max_load_factor(float lf) const noexcept { // NOLINT(modernize-use-nodiscard) ROBIN_HOOD_TRACE(this) return MaxLoadFactor100 / 100.0F; }

martinus commented 3 years ago

robin_hood map uses a template parameter, so it is not possible to set the max_load_factor at runtime. Is it an issue to not have this method? I don't want to have it here and do nothing, just to be more compatible

ktprime commented 3 years ago

from benchamrk wyhash is the fastest string hash(for hash map). https://github.com/wangyi-fudan/wyhash your can try test and compre it with your robin_hood::hash. my emhash use wyhash(string key only) and gain 20% performance improved .

martinus commented 3 years ago

I'm switching to using hardware accelearated CRC32 if available.