# zyedidia/generic

A collection of generic data structures written in Go.

Repository: https://github.com/zyedidia/generic
Canonical: https://ross.abutalabs.com/products/generic
Language: Go
License: MIT
License Family: permissive
Topics: data-structures, generics, go
Last push: 2024-01-07T14:50:00+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": 1722, "days_push": 969, "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 1348, forks 82 (observed 2026-08-28T04:04:27.781137+00:00)

## What it is
A collection of generic data structures for Go 1.18+ built with type parameters, including trees, maps, sets, heaps, queues, ropes, and tries. Each structure lives in its own subpackage with documentation and examples.

## Use cases
- use generic data structures in Go without writing my own
- need an AVL tree or B-tree with type parameters
- want an LRU cache implementation in Go
- need a bidirectional map or multimap
- looking for a rope or interval tree in Go
- need a hashmap that can be efficiently copied

## When to choose
- you need common data structures with Go generics and minimal dependencies
- you want small, focused subpackages you can import individually
- you need structures like ropes, interval trees, or copy-on-write hashmaps not in the standard library

## When to avoid
- you need concurrent/thread-safe data structures out of the box
- you need a batteries-included collections library with iterators and rich APIs
- you are not using Go 1.18 or later

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools
- domain: developer-tools
- platform: go
- tags: data-structures, generics, avl-tree, btree, hashmap, rope, trie, lru-cache, algorithms

## Member repositories
- zyedidia/generic (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:27.781137+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:42:35.332261+00:00, confidence not recorded.
  - readme: https://github.com/zyedidia/generic (fetched 2026-08-28T04:04:27.781137+00:00, sha 0c9d231fadc5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
