# orcaman/concurrent-map

a thread-safe concurrent map for go

Repository: https://github.com/orcaman/concurrent-map
Canonical: https://ross.abutalabs.com/products/concurrent-map
Language: Go
License: MIT
License Family: permissive
Topics: golang, go, concurrency, map, concurrent-programming, thread-safety
Last push: 2024-05-22T08:17:29+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4350, "days_push": 833, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4530, forks 554 (observed 2026-08-28T04:08:52.962493+00:00)

## What it is
A thread-safe concurrent map implementation for Go that shards the map to minimize lock contention. It predates and complements the stdlib sync.Map, which is optimized for append-only scenarios.

## Use cases
- share a map between goroutines safely
- use a map as a simple in-memory database
- avoid manual mutex locking around Go maps
- high-throughput concurrent key-value access
- replace sync.Map for mixed read/write workloads

## When to choose
- you need concurrent reads and writes to a shared map with frequent updates
- sync.Map's append-only design doesn't fit your access pattern
- you want a map API close to the native Go map

## When to avoid
- your workload is append-only or read-mostly, where sync.Map is faster
- you're on Go 1.9+ and stdlib sync.Map suffices
- you need persistence or a full in-memory database

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, caching
- domain: developer-tools, performance
- platform: go, cross-platform
- tags: thread-safe, sharded-map, concurrent-map, in-memory-store, algorithms

## Member repositories
- orcaman/concurrent-map (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:52.962493+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-29T18:20:13.559922+00:00, confidence not recorded.
  - readme: https://github.com/orcaman/concurrent-map (fetched 2026-08-28T04:08:52.962493+00:00, sha b360cdc9f18a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
