A research and benchmarking suite for advanced hash function models, including perfect hashing, cryptographic hashing, and hybrid approaches. This project provides high-performance C++ implementations, benchmarking tools, and result visualization.
├── include/ # Header files for all hash models and utilities
├── src/ # C++ source files for hash models, main, and benchmarks
├── build/ # Build output (executables, intermediate files, results)
├── CMakeLists.txt # CMake build configuration
├── benchmark_results.csv # Output: benchmark results (CSV)
- include/: All hash model headers (see below for details)
- src/: Implementations, main entry, and benchmarking logic
- build/: Output directory after building (executables, results)
- CMakeLists.txt: CMake build script
- C++17 compatible compiler (MSVC, GCC, or Clang)
- CMake 3.15+
- Clone the repository
git clone <repo-url> cd hash_project
- Configure and build with CMake
mkdir build cd build cmake .. cmake --build . --config Release
- Executables will be in
build/Release/(Windows) orbuild/(Linux/macOS)
- Executables will be in
- Run all benchmarks:
# From build directory ./hash_project # (Linux/macOS) .\Release\hash_project.exe # (Windows)
- Run throughput benchmark:
./throughput_benchmark # (Linux/macOS) .\Release\throughput_benchmark.exe # (Windows)
- Results:
- Benchmark results are saved as CSV in
build/(e.g.,benchmark_results.csv)
- Benchmark results are saved as CSV in
- BasicPerfectHash (FKS): Two-level perfect hashing (Fredman-Komlós-Szemerédi)
- BDZ_MPHF: Minimal perfect hash (Belazzougui-Botelho-Dietzfelbinger)
- CuckooPerfectHash: Cuckoo-based perfect hashing
- BasicCryptoHash: SHA-256 baseline implementation
- SipHash: Fast keyed hash (DoS-resistant)
- BLAKE3Hash: High-performance cryptographic hash
- MurmurHash3: Fast, non-cryptographic hash
- UltimateHybridHash: Multi-stage (SipHash → BDZ → BLAKE3 → cache-aware)
- AdaptiveSecurityHybrid: Runtime-tunable cryptographic verification
- ParallelVerificationHybrid: Latency hiding via parallel verification
- CachePartitionedHybrid: Hardware-aware, Bloom filter-optimized
- UltraLowMemoryHybrid: Minimal storage, on-demand verification
- TwoPathHybrid: Dual-lane (fast/secure) hybrid
- HybridCryptoPerfect: SipHash preprocessing + BDZ MPHF
- HybridPerfectVerify: Cuckoo perfect index + BLAKE3 verification
base_hash.hpp— Abstract base class for all hash modelsbenchmark_suite.hpp— Benchmarking utilities and result structuresbasic_perfect_hash.hpp— FKS two-level perfect hashingbdz_mphf.hpp— BDZ minimal perfect hashcuckoo_perfect_hash.hpp— Cuckoo-based perfect hashbasic_crypto_hash.hpp— SHA-256 implementationsiphash.hpp— SipHash-2-4 (keyed hash)blake3_hash.hpp— BLAKE3-inspired hashmurmur_hash.hpp— MurmurHash3 (fast, non-crypto)ultimate_hybrid.hpp— Multi-stage hybrid (SipHash, BDZ, BLAKE3)adaptive_security_hybrid.hpp— Security-level-tunable hybridparallel_verification_hybrid.hpp— Parallelized hybridcache_partitioned_hybrid.hpp— Cache/Bloom filter hybridultra_low_memory_hybrid.hpp— Minimal memory hybridtwo_path_hybrid.hpp— Dual-lane hybridhybrid_crypto_perfect.hpp— SipHash + BDZ hybridhybrid_perfect_verify.hpp— Cuckoo + BLAKE3 hybrid
main.cpp— Main entry, runs all benchmarksbenchmark_runner.cpp— Factory and runner for all modelsthroughput_benchmark.cpp— Throughput-focused benchmark*.cpp— Implementations for each hash model
benchmark_results.csv— Output: benchmark results
- Authors: Mahir Rešidović and Nedim Bečić
- Research: Faculty of Electrical Engineering Sarajevo
For questions, suggestions, or contributions, open an issue or contact the maintainers: