A C++ header-only library providing fast hash map and hash set implementations using robin hood hashing with open addressing.
robin-map is a C++ library that provides fast hash map and hash set implementations using robin hood hashing. It solves the problem of slow hash table performance in standard library containers by offering optimized collision resolution, optional hash storage, and efficient serialization, making it suitable for high-performance applications.
C++ developers working on performance-critical systems, game engines, or data-intensive applications who need faster associative containers than `std::unordered_map` or `std::unordered_set`.
Developers choose robin-map for its significant speed improvements, header-only design, and additional features like heterogeneous lookups and serialization, while maintaining compatibility with the familiar STL API.
C++ implementation of a fast hash map and hash set using robin hood hashing
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Simply add the include directory to your project; no compilation is required, making integration straightforward for C++17 projects.
Uses robin hood hashing with open addressing, benchmarked to show significant speed improvements over std::unordered_map, as documented in the provided benchmarks.
Supports find operations with types different from the key (e.g., pointers instead of smart pointers), reducing temporary object creation and improving flexibility.
Provides efficient serialize and deserialize methods for saving and loading hash table data, with examples for integration using custom function objects.
Can be compiled without exceptions using -fno-exceptions or TSL_NO_EXCEPTIONS, making it suitable for environments where exceptions are disabled.
Iterators return const pairs, requiring .value() to modify values, and it lacks some std::unordered_map methods like bucket operations, deviating from standard expectations.
With power-of-two growth and poor hash functions, collisions can cause exponential storage growth without performance improvement, as admitted in the README's performance pitfalls section.
The erase() method can have quadratic runtime cost when the table has a low load factor, though erase_fast() is provided as an alternative to mitigate this.
The README states that 'All methods are not documented yet,' which may hinder adoption for developers needing comprehensive API references beyond the basics.