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

why not add robin_hood::unordered_multixxx version? #122

Closed chipsethan closed 3 years ago

chipsethan commented 3 years ago

There are std::unordered_multimap and std::unordered_multiset in C++ STL. So, I hope robin_hood hash table can add the two versions as well.

martinus commented 3 years ago

Wow I didn't even know there is a std::unordered_multimap, I never needed anything like that. I'm not sure this would be worth the effort, this can be simulated with a unordered_map and a vector as the value.

chipsethan commented 3 years ago

If you just want to use it by yourself, your hash table does not need to adapt to anything else. But remember, it would be always a tiny "toy" in this way to be developed and maintained. If I were you, for the 1st step, I will make it compatible to the standard hash tables in C++ STL, for the 2nd step, carrying out a thorough test with integers, strings(unicode) and many other data types, for the 3rd step, contributing code to GNU g++ with this technology of std::unordered_xxx. I am not sure whether you can understand me or not, as English is not my native language. I mean I do not hope a sound technology would be buried in such a weird way only because it is tiny.

martinus commented 3 years ago

stl is bound to use the implementation that std::unordered_map uses due to compatibility issues.