# elliotchance/orderedmap

🔃 An ordered map in Go with amortized O(1) for Set, Get, Delete and Len.

Repository: https://github.com/elliotchance/orderedmap
Canonical: https://ross.abutalabs.com/products/orderedmap
Language: Go
License: MIT
License Family: permissive
Topics: golang, data-structures, maps, orderedmap
Last push: 2026-07-11T22:17:01+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 92, release rhythm 92, longevity 100
- inputs: {"age_days": 2484, "days_push": 53, "days_rel": 53, "gap_med": 0.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1026, forks 77 (observed 2026-08-28T04:03:16.578128+00:00)

## What it is
A Go library providing an ordered map data structure that maintains insertion order with amortized O(1) Set, Get, Delete, and Len operations. It combines a native Go map with a linked list and supports Go 1.23 iterators for bidirectional traversal.

## Use cases
- maintain insertion order of map keys in Go
- iterate a map in the order items were added
- get O(1) ordered map operations in Go
- convert an ordered map to a slice of keys or values
- reverse-iterate a map from newest to oldest entries

## When to choose
- you need a Go map that preserves insertion order with high performance
- you want Go 1.23 range-over-func iterator support
- you need generics support with simple Set/Get/Delete semantics

## When to avoid
- you only need an unordered map - use the built-in Go map
- you need concurrency-safe ordered maps without external locking
- you're on Go versions older than 1.17

## Facets
- artifact type: library
- maturity: stable
- function: data-science, developer-tools
- domain: developer-tools
- platform: go
- tags: ordered-map, data-structures, generics, linked-list, insertion-order, algorithms

## Member repositories
- elliotchance/orderedmap (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:16.578128+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-30T07:07:57.746476+00:00, confidence not recorded.
  - readme: https://github.com/elliotchance/orderedmap (fetched 2026-08-28T04:03:16.578128+00:00, sha 53ee086ad747)
- Data as of 2026-08-30T08:39:29.467469+00:00.
