An Extensive Benchmark of C and C++ Hash Tables #1
Replies: 9 comments 30 replies
-
|
This is outstanding work—I understand that this type of project requires significant effort. However, here's what's missing from my point of view: • The Qt QHash map (keep in mind that Qt is a very popular framework, so being aware of alternative maps would be beneficial). At the very least, Qt maps are used more frequently than some map implementations you evaluate. • The benchmark focuses on large containers. In many applications, maps are not nearly as full, so data on smaller containers would have been appreciated. |
Beta Was this translation helpful? Give feedback.
-
|
thanks for the amazing work! Can you please also include |
Beta Was this translation helpful? Give feedback.
-
|
Please add PGM index. https://github.com/gvinciguerra/PGM-index/blob/master/examples/updates.cpp PGM index doesn't even need a hash function for integer keys. And maybe fph https://github.com/renzibei/fph-table |
Beta Was this translation helpful? Give feedback.
-
|
Great article, for C you might be interested in : It features a cuckoo hash table with memory layout optimized for SIMD lookup, and the addition of a small bloom filter in each bucket to improve negative lookups. It can work looking up single value but also offers a batch lookup interface that allow further performance optimizations like prefetching, loop unrolling,… |
Beta Was this translation helpful? Give feedback.
-
|
Amazing work! Thanks a lot for the detailed explanation. Does the author have statistics for the CPU and Memory usage when benchmarking each table? I am wondering when the system's CPU load is high, whether the performance of the SIMD tables will be impacted. |
Beta Was this translation helpful? Give feedback.
-
|
It might be nice to have more analysis on memory consumption and code size. Do you have recommendation for improvements on https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/ADT/DenseMap.h ? It is like Google's original dense hash map. It has strong constraints on code size and memory consumption, which might make migration to other hash maps difficult. |
Beta Was this translation helpful? Give feedback.
-
|
This project has been a source of inspiration in some internal testing I have done -- thank you for your time and effort. I want to share a folly environment you can develop and benchmark with, on any platform, using Docker: folly-docker-env I have performed benchmarks for close to 90% of the libraries requested above, and will open-source the code and results in a matter of time. |
Beta Was this translation helpful? Give feedback.
-
|
I tried it with boost 1.88 (current version). Boost is slightly better on my 1.8ghz i7 with 1.88, although it's still weaker at Iterating than anything else. I tested by adding the boost path to a g++ include, do you have a one-liner to copy it into a single file like for 1.85? Would be good to keep it up to date. |
Beta Was this translation helpful? Give feedback.
-
|
Finally published an updated version of the suite: I added the 're-insert after erase' benchmark (to showcase tombstones effect) I did it to test a new unordered map I was working on (flat_wmap). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Comments on the article An Extensive Benchmark of C and C++ Hash Tables belong below.
Beta Was this translation helpful? Give feedback.
All reactions