🍺 BREW Explorer

← all formulae

hopscotch-map

brew install hopscotch-map v2.4.0 MIT

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

30-day installs
2
90-day · #18679
35
365-day · #12107
766
★ GitHub stars · updated 9mo ago

Build dependencies

GitHub topics

c-plus-plus cpp data-structures hash-map hash-table header-only

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "cmake"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "C++ implementation of a fast hash map and hash set using hopscotch hashing",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:38:40+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "hopscotch-map",
  "github_default_branch": "master",
  "github_last_commit_at": "2025-11-02T18:47:59Z",
  "github_readme_excerpt": "[![CI](https://github.com/Tessil/hopscotch-map/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Tessil/hopscotch-map/actions/workflows/ci.yml)\n\n## A C++ implementation of a fast hash map and hash set using hopscotch hashing\n\nThe hopscotch-map library is a C++ implementation of a fast hash map and hash set using open-addressing and hopscotch hashing to resolve collisions. It is a cache-friendly data structure offering better performances than `std::unordered_map` in most cases and is closely similar to `google::dense_hash_map` while using less memory and providing more functionalities.\n\nThe library provides the following main classes: `tsl::hopscotch_map`, `tsl::hopscotch_set`, `tsl::hopscotch_pg_map` and `tsl::hopscotch_pg_set`. The first two are faster and use a power of two growth policy, the last two use a prime growth policy instead and are able to cope better with a poor hash function. Use the prime version if there is a chance of repeating patterns in the lower bits of your hash (e.g. you are storing pointers with an identity hash function). See [GrowthPolicy](#growth-policy) for details.\n\n\nIn addition to these classes the library also provides `tsl::bhopscotch_map`, `tsl::bhopscotch_set`, `tsl::bhopscotch_pg_map` and `tsl::bhopscotch_pg_set`. These classes have an additional requirement for the key, it must be `LessThanComparable`, but they provide a better asymptotic upper bound, see [details](#deny-of-service-dos-attack) in example. Nonetheless if you don\u0027t have specific requirements (risk of hash DoS attacks), `tsl::hopscotch_map` and `tsl::hopscotch_set` should be sufficient in most cases and should be your default pick as they perform better in general.\n\n\nAn overview of hopscotch hashing and some implementation details can be found [here](https://tessil.github.io/2016/08/29/hopscotch-hashing.html).\n\nA **benchmark** of `tsl::hopscotch_map` against other hash maps may be found [here](https://tessil.github.io/2016/08/29/benchmark-hopsco",
  "github_repo": "Tessil/hopscotch-map",
  "github_stars": 766,
  "github_topics": [
    "c-plus-plus",
    "cpp",
    "data-structures",
    "hash-map",
    "hash-table",
    "header-only"
  ],
  "homepage": "https://github.com/Tessil/hopscotch-map",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": null,
  "installs_365d": 35,
  "installs_90d": 2,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "hopscotch-map",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": null,
  "rank_365d": 12107,
  "rank_90d": 18679,
  "raw_hash": "10b6499ae60938aa",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/h/hopscotch-map.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": null,
  "version_stable": "2.4.0",
  "versioned_formulae": [],
  "why_use_this": null
}