# greg7mdp/sparsepp

A fast, memory efficient hash map for C++

Repository: https://github.com/greg7mdp/sparsepp
Canonical: https://ross.abutalabs.com/products/sparsepp
Language: C++
License: NOASSERTION
License Family: other
Topics: hash-tables, sparse-containers, unordered, sparsehash, hashmap, hash, hash-map, sparse
Last push: 2026-06-13T12:21:35+00:00

## Health v2 (maintenance only)
Score: 79/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 87, release rhythm 56, longevity 100
- inputs: {"age_days": 3664, "days_push": 81, "days_rel": 81, "gap_med": null, "n_releases_24m": 1}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1312, forks 127 (observed 2026-08-28T04:04:20.221676+00:00)

## What it is
Sparsepp is a fast, memory-efficient hash map and hash set library for C++, derived from Google's sparsehash. It serves as a drop-in replacement for std::unordered_map/unordered_set with very low memory overhead and minimal memory spikes during resizing.

## Use cases
- replace std::unordered_map with a faster, lower-memory hash map in C++
- store large hash maps with minimal memory overhead per entry
- avoid large memory spikes when a hash table resizes
- use a sparsehash-style container with C++11 support
- speed up lookups and insertions compared to the standard unordered_map

## When to choose
- you need extremely low memory usage (about one byte overhead per entry)
- your workload resizes hash tables frequently and memory high-water marks matter
- you are stuck with a pre-C++11 compiler
- you want a drop-in replacement for unordered_map/unordered_set

## When to avoid
- you can use C++11 or later - the author recommends parallel-hashmap instead for better speed
- slightly higher memory usage is acceptable and you want maximum performance
- you need a consistently faster option and can afford dense_hash_map's memory usage

## Facets
- artifact type: library
- maturity: maintenance
- function: caching, developer-tools
- domain: performance, developer-tools
- platform: cpp, cross-platform, windows
- tags: hash-map, hash-set, sparsehash, unordered-map, open-addressing, memory-efficiency, header-only, algorithms, linux, macos

## Member repositories
- greg7mdp/sparsepp (main) score 79

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:20.221676+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:49:05.165050+00:00, confidence not recorded.
  - readme: https://github.com/greg7mdp/sparsepp (fetched 2026-08-28T04:04:20.221676+00:00, sha 3808a661bf75)
- Data as of 2026-08-30T08:39:29.467469+00:00.
