-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmarks vs google dens hash map and flat_hash_map #1
Comments
a good hash map, it's quite same as one of my emhash8(https://github.com/ktprime/emhash/blob/master/hash_table8.hpp) design |
if index moves from node to bucket, your hashmap will be more efficient(memory and performance) |
Hi @ktprime would you mind expanding a bit more on your idea of moving the index? |
I use the following bucket vector as index(metadata)
your current implemention is simple(use integer index/vector to replace chained map's pointer/list) and also efficient, |
huangyuanbing1@ubuntu:~/map_benchmark/build ```
huangyuanbing1@ubuntu:~/map_benchmark/build
at present the two hashmap(dense hash map) is the fastest iteration implemention compared with other's flat hash map in martinus's benchmark code. |
Right. I am getting what you mean now. By moving the next index into the bucket's structure, you are removing some unnecessary gaps in between the nodes. I believe that a colleague of mine tried that strategy on our dense_hash_map but couldn't see any significant improvements and we abandoned that idea. But it seems that you have reproducible results which are really interesting. Thanks for pointing it out 👍 I will think of the trade-offs of doing it this way (if there is any of course) and could attempt to improve that hash_map. |
Have you considered implementing this suggestion as well as updating to C++20? I know you mentioned interest in doing so in your blog post |
Could you add some benchmarks for the library
https://github.com/skarupke/flat_hash_map
The text was updated successfully, but these errors were encountered: