A C++ implementation of a fast hash map and hash set using hopscotch hashing

This ‘faster’ code tool dropped—and the comments instantly started fact-checking the hype

TLDR: A new C++ data-storage library says it can beat the usual built-in option on speed and memory use. But commenters zeroed in on old benchmark charts and argued a Google-made rival may already be faster, turning the launch into a debate over whether the hype really holds up.

A new C++ library called hopscotch-map is pitching itself as a fast, memory-saving replacement for the standard way many programmers store and look up data. In plain English: it’s a new toolbox for developers who want their apps to find stuff quicker without hogging memory. It’s flexible, lightweight, and tries to look familiar to anyone already using the usual built-in option. On paper, this is the kind of release performance-obsessed coders love to cheer.

But the real show started in the comments, where the applause quickly turned into a benchmark cage match. One commenter immediately hit the brakes with a classic internet reality check: how does this stack up against Boost’s rival tool, and why are the performance charts apparently from 2019? Ouch. Another went straight for the jugular, pointing out that the project’s own graph seems to show Google’s dense hash map winning anyway. That sparked the core drama: is this a breakthrough, or just another “fastest ever” coding project getting roasted by its own receipts?

The mood was less “wow, amazing” and more “show us the numbers, and make them recent.” The humor here is subtle but brutal: nothing makes developers more suspicious than a shiny speed claim sitting next to old charts and a graph that may be undermining the sales pitch. In other words, the library arrived promising speed, and the crowd responded with the programmer version of popcorn: benchmark nitpicking, rival name-dropping, and instant skepticism.

Key Points

  • The article introduces hopscotch-map as a header-only C++ library implementing fast hash maps and hash sets with open addressing and hopscotch hashing.
  • It provides standard and prime-growth variants, with prime-growth classes intended to better handle poor hash functions and repeating lower-bit hash patterns.
  • The library also includes bounded hopscotch variants that require LessThanComparable keys and provide worst-case O(log n) lookups and deletions for resistance to hash table DoS attacks.
  • Feature highlights include support for move-only and non-default-constructible types, heterogeneous lookup, optional stored hashes, precalculated-hash lookup, and operation with exceptions disabled.
  • The article notes interface differences from std::unordered_map, including iterator invalidation behavior and iterator access returning const std::pair<Key, T> rather than std::pair<const Key, T>.

Hottest takes

"Looks like the benchmarks were last updated in 2019." — mgaunard
"How does it compare to boost unordered flat map?" — mgaunard
"google::dense_hash_map is faster" — jll29
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.