hashtable-bench
sparsepp
hashtable-bench | sparsepp | |
---|---|---|
1 | 4 | |
12 | 1,230 | |
- | - | |
1.7 | 1.1 | |
12 months ago | about 1 year ago | |
Jupyter Notebook | C++ | |
- | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
hashtable-bench
-
Updating map_benchmarks: Send your hashmaps!
I believe that when the number of elements is larger than 4 (a rough estimation), the associative linear table won't be faster than ska::flat_hash_map or fph-table with the identity hash function. If you look at the benchmark results, you will find that the average lookup time may well be less than 2 nanoseconds when item number is smaller than one thousand on morden CPUs. For these two hash tables, there are only about ten instructions in the critical path of lookup. And this should be faster than the linear search in a associative table, where there are a lot of branches and comparing instructions. However, you should benchmark it youself to get the real conclusion. This is just a simple analysis on paper from mine. By the way, the associative table can be faster if it is implemented with hardware circuits or SIMD instructions.
sparsepp
-
Updating map_benchmarks: Send your hashmaps!
Also, I'm testing https://github.com/greg7mdp/sparsepp which is based on google's sparsehash
-
Who here is ready to see some 64MB blocks on mainnet?
Hey thanks for the mention /u/jtoomim. I see that you used sparsepp in CoinsViewCache. A phmap::flat_hash_map would probably be similar for memory usage, but likely faster (because of parallel lookup with SSE instructions and contiguous memory storage in one array).
What are some alternatives?
eytzinger - Cache-friendly associative STL-like container with an Eytzinger (BFS) layout for C++
PEGTL - Parsing Expression Grammar Template Library
CppPerformanceBenchmarks
Inja - A Template Engine for Modern C++
gtl - Greg's Template Library of useful classes.
Hashmaps - Various open addressing hashmap algorithms in C++
llvm-project - The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
LSHBOX - A c++ toolbox of locality-sensitive hashing (LSH), provides several popular LSH algorithms, also support python and matlab.
dense_hash_map - A simple replacement for std::unordered_map
dynamic_bitset - Simple Useful Libraries: C++17/20 header-only dynamic bitset
qc-hash - Extremely fast unordered map and set library for C++20
Optional Argument in C++ - Named Optional Arguments in C++17