ktprime / emhash

Fast and memory efficient c++ flat hash map/set
MIT License
511 stars 35 forks source link

Is there any plan for a release or a tag? #20

Closed zhqrbitee closed 1 year ago

zhqrbitee commented 2 years ago

Hi, Is there any plan for a release or a tag? It is hard to know which commit is considered to be a stable version, so it is inconvenient to maintain it as a third-party dependency.

ktprime commented 2 years ago

It's a good issiue, I have a plan to make a relase/tag.
emhash is stable for normal use cases, most commits come from benchmark/3rd update(a new benchmark repository)

btw do you use it in your project? why not use the other hash map?

zhqrbitee commented 1 year ago

Sorry for a bit late reply. Yes, we have use it in our project and we have internal benchmark with a bunch of hash maps. Our use case requires high frequency insertion (we guarantee the inserted key is unique each time), find and erase and your one gives the best performance.

ktprime commented 1 year ago

try use insert_unique(10% fast than emplace) if inserted key is unique.
if The key is integral and care about finding hit performance, set marco EMH_FIND_HIT for better find. (emhash5/6) I've added a new featue in emhash5 optimaiztion for small hash_map.(emhash5 only)

image

emhash567 is very senstive to small key/value. HashMap<int64_t, int32_t> is about 20% fast than HashMap<int64_t, int64_t>, and save 1/3 memory

As for complex dataset (ex sizeof(value_type) >= 24) emhash8 is a better choice because it is a dense hash map like martinus's unordered_dense