martinus / unordered_dense

A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion
MIT License
898 stars 72 forks source link

Support for multiset / multimap versions? #66

Closed jcelerier closed 1 year ago

jcelerier commented 1 year ago

e.g. analoguous to the std::unordered_multi{set,map} ; is this on the roadmap / compatible with the design in any way?

martinus commented 1 year ago

It's not planned, and I never really needed these. You could have e.g use a std::vector as mapped value instead

jcelerier commented 1 year ago

hmmm, for unordered_multiset it wouldn't work - the "multi" is not only on the value but on the key

martinus commented 1 year ago

Thats true, but isn't a multiset basically a map where the value is a counter for the number of entries? Sure the API is different, but at least it's possible to have basically the same features

kabicm commented 11 months ago

std::unordered_multimap would be useful e.g. for implementing hash joins.

Do we know any performance comparison between e.g. std::unordere_multimap<int, int> vs ankerl::unordered_dense::map<int, std:vector<int>>?

I am curious if using the std::vector as the value would hurt the performance of ankerl::unordered_dense::map.

Also, is boost a hard dependency here?

Thanks a lot for your help!