map_benchmark  by martinus

C++ benchmark suite for hash map implementations

Created 7 years ago
313 stars

Top 86.1% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides comprehensive benchmarks for C++ unordered map implementations, targeting developers and researchers who need to evaluate the performance of different hash table designs. It aims to offer a standardized and reproducible way to compare map performance across various workloads.

How It Works

The benchmark suite is structured to easily integrate new map and hash implementations. New maps are added as git submodules in the external directory, with their C++ interface defined in src/maps/<map_name>/Map.h. Similarly, hash functions are defined in src/hashes/<hash_name>/Hash.h. This modular design allows for straightforward comparison of different data structures and hashing algorithms.

Quick Start & Requirements

  • Install dependencies: folly (see Folly Ubuntu installation), ninja, cmake.
  • Clone the repository: git clone --recurse-submodules https://github.com/martinus/map_benchmark.git
  • Update submodules: ./map_benchmark/tools/build.sh
  • Tune system for reliable benchmarks: sudo python3 -m perf system tune
  • Run benchmarks: ../tools/bench.rb |tee ../data/all_new.txt
  • Requires Linux with perf and CPU isolation configuration.

Highlighted Details

  • Benchmarks various C++ unordered map implementations, including robin_hood::unordered_flat_map.
  • Supports adding custom hash functions and map implementations via git submodules.
  • Provides detailed instructions for CPU isolation and system tuning for reliable results.
  • Source code layout is organized by map and hash implementation for clarity.

Maintenance & Community

The project is maintained by martinus. No specific community channels or roadmap are detailed in the README.

Licensing & Compatibility

The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

Some map implementations, like QHash and rigtorp::HashMap, could not be easily integrated due to interface differences or missing default constructors. Achieving reliable benchmarks requires careful CPU isolation and system tuning.

Health Check
Last Commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.