# Workiva/go-datastructures

A collection of useful, performant, and threadsafe Go datastructures.

Repository: https://github.com/Workiva/go-datastructures
Canonical: https://ross.abutalabs.com/products/go-datastructures
Language: Go
License: Apache-2.0
License Family: permissive
Last push: 2026-07-31T20:09:08+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 42, longevity 100
- inputs: {"age_days": 4326, "days_push": 33, "days_rel": 306, "gap_med": 58, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7954, forks 841 (observed 2026-08-28T04:10:10.221488+00:00)

## What it is
A collection of useful, performant, and threadsafe data structures for Go, including augmented interval trees, bitarrays, futures, non-blocking queues, an MPMC ring buffer, and a Fibonacci heap. It emphasizes lock-free/CAS-based concurrency and benchmarks against standard alternatives like channels.

## Use cases
- threadsafe queue for goroutines in go
- fast priority queue implementation in Go
- interval tree for n-dimensional range collision queries
- broadcast an event to multiple listeners instead of a single channel consumer
- lock-free MPMC ring buffer to synchronize and shut down goroutines
- bitarray membership and intersection testing with uint64 identifiers
- heap with cheap decrease-key for Dijkstra or Prim algorithms

## When to choose
- You need concurrent, non-blocking queues that can outperform Go channels and never panic on send
- You need interval or range intersection queries in one or more dimensions
- You need to notify many goroutines of the same event, which channels handle poorly
- You need a Fibonacci or priority heap for graph algorithms or ordered scheduling

## When to avoid
- You only need basic slices and maps already provided by the Go standard library
- You need bounded queues with backpressure, since these queues never block on send and grow unbounded
- You want generics-based, idiomatic modern Go APIs, as this library predates generics and relies on interfaces and uint64 identifiers

## Facets
- artifact type: library
- maturity: active
- function: concurrency
- domain: developer-tools
- platform: go
- tags: data-structures, priority-queue, fibonacci-heap, interval-tree, bitarray, ring-buffer, futures, threadsafe, lock-free, algorithms

## Member repositories
- Workiva/go-datastructures (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:10.221488+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-29T17:32:37.767160+00:00, confidence not recorded.
  - readme: https://github.com/Workiva/go-datastructures (fetched 2026-08-28T04:10:10.221488+00:00, sha e9d76db429e7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
