A C++ implementation of a fast hash map and hash set using hopscotch hashing
Hopscotch-map is a C++ library providing fast hash map and hash set implementations using hopscotch hashing, offering open-addressing, cache-friendly storage, and support for heterogeneous lookups and customizable memory allocators.
Background
- **Hopscotch hashing** is an open-addressing hash-table technique designed for high concurrency and cache-friendliness. It keeps each key close to its "home" bucket, so lookups mostly touch a single cache line.
- **Tessil** (Thibaut Goetghebuer-Planchon) is a well-known C++ library author whose `robin-map` and `hopscotch-map` are widely used in performance-critical projects.
- This repo provides drop-in `std::unordered_map`-like containers (`tsl::hopscotch_map`, `tsl::hopscotch_set`) that often outperform the standard library in speed and memory, especially under concurrent read scenarios.
- **Why it matters:** Many C++ applications (game engines, databases, real-time trading systems) need the fastest possible associative containers. A bad hash table can become a bottleneck; hopscotch hashing is one of the leading modern alternatives to the classic "chaining" or "Robin Hood" approaches.