A memory efficient hashfree hashmap implementation packaged as a header-only library.
Ubuntu (assuming 24.04 LTS):
sudo apt install cmake ninja-build g++
sudo apt install libsparsehash-devmacOS (install XCode from AppStore, and Homebrew) using native AppleClang:
brew install cmake ninja
brew install google-sparsehashmacOS (install XCode from AppStore, and Homebrew) using GCC from brew:
brew install cmake ninja gcc
brew install google-sparsehash
export CC=gcc-15
export CXX=g++-15Windows MSYS2 UCRT64:
PRE=mingw-w64-ucrt-x86_64
pacman -S $PRE-git $PRE-cmake $PRE-ninja $PRE-toolchain $PRE-sparsehashUse CMake to install to $PWD/local (headers and CMake configuration):
cmake --workflow --preset quick-release && \
cmake --install build-quick --config Release --prefix=$PWD/localDirectory example contains a sample project using ptrie.
Test against the ptrie installed in local using ptrie.cmake:
cmake -S example -B build-example-local -DCMAKE_PREFIX_PATH=$PWD/local && \
cmake --build build-example-local && \
ctest --test-dir build-example-local --verboseTest by fetching ptrie from the repository using ptrie.cmake:
cmake -S example -B build-example && \
cmake --build build-example && \
ctest --test-dir build-example --verboseClean all:
rm -Rf local build-quick build-example-local build-exampleBenchmark results are plotted using python when the following packages are installed:
sudo apt install python3-matplotlib python3-pandas python3-scipy python3-pyqt6Test and benchmark a release build:
cmake --workflow --preset releaseTest and debug with sanitizers:
cmake --workflow --preset debug-sanInspect other workflow presets:
cmake --workflow --list-presetsSee also configuration, build and test presets:
cmake --list-presets=configure
cmake --list-presets=build
cmake --list-presets=testFor example multi-config with sanitizers Debug build and test:
cmake --preset multi-san
cmake --build --preset debug-san
ctest --preset debug-san