Experiments in fast C++ hash containers.
| Directory | What it is |
|---|---|
flex_hash/ |
A header-only, C++17 hash map/set whose storage layout is chosen at compile time from a hash_policy tag. See flex_hash/README.md. |
hash_bench/ |
A benchmark comparing flex_hash against std::unordered_*, ankerl unordered_dense, ska flat_hash_map, and emhash. See hash_bench/RESULTS.md. |
flex_hash is header-only with no external dependencies:
#include <flex/flex_hash.h>
flex::hash_map<uint64_t, uint64_t> m; // BALANCED (default)
m.insert_or_assign(1, 100);g++ -std=c++17 -O2 -Iflex_hash/include your_program.cpp
The third-party libraries are not vendored. Fetch them on demand, then build:
cd hash_bench
./fetch_deps.sh # clones ankerl / emhash / ska into deps/ (also auto-run by make)
make run