A family of header-only C++ hashmap and btree containers offering drop-in replacements for std::unordered_map/std::map with superior speed and memory efficiency.
Parallel Hashmap is a family of header-only C++ containers providing high-performance hash maps and btree-based ordered maps. It serves as a drop-in replacement for standard library containers like std::unordered_map and std::map, offering significantly better speed and memory efficiency. The project solves the need for faster associative containers in performance-sensitive C++ applications without requiring complex builds or dependencies.
C++ developers working on performance-critical systems, game engines, databases, or any application where fast lookup and insertion times are essential. It's particularly valuable for those already using std::unordered_map or std::map and seeking a straightforward upgrade.
Developers choose Parallel Hashmap because it combines the ease of header-only integration with proven performance gains over standard and Boost containers. Its design, based on Google's Abseil library, ensures reliability while offering features like heterogeneous lookup, serialization, and configurable thread safety.
A family of header-only, very fast and memory-friendly hashmap and btree containers.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Just copy the headers into your project with no build step required, making adoption trivial and build-system friendly, as emphasized in the installation instructions.
Direct replacements for std::unordered_map, std::map, and others allow seamless upgrades without code changes, ensuring low integration effort.
Uses SSE2 instructions for parallel lookups and closed hashing, consistently outperforming standard library and Boost containers in benchmarks, as detailed in the design writeup.
Configurable flat or node storage reduces overhead, and parallel hash maps cut peak memory during resizing by up to 97%, illustrated with clear memory usage charts.
Supports heterogeneous lookup, fast serialization for trivially copyable data, and thread-safe configurations with mutex types, adding value beyond basic containers.
Offers eight hash map variants and btree containers with subtle trade-offs (flat vs. node, parallel vs. non-parallel), requiring careful analysis that can slow down decision-making.
The author actively encourages migration to the GTL library for C++20+, indicating parallel-hashmap may receive reduced maintenance and fewer updates, risking long-term viability.
Flat hash maps and btree containers invalidate pointers or iterators upon mutation, unlike std::map, which can introduce bugs in code relying on stable references without careful refactoring.
Forward declaration via phmap_fwd_decl.h does not work for hash maps with pointer keys, a admitted limitation that complicates header-only usage in some scenarios.