# google/btree

BTree provides a simple, ordered, in-memory data structure for Go programs.

Repository: https://github.com/google/btree
Canonical: https://ross.abutalabs.com/products/btree
Language: Go
License: Apache-2.0
License Family: permissive
Archived: true
Last push: 2024-08-21T16:46:53+00:00

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

## Adoption (not part of the score)
Stars 4163, forks 421 (observed 2026-08-28T04:08:37.783318+00:00)

## What it is
A Go library providing an in-memory B-Tree implementation as an ordered, mutable data structure. It offers an API compatible with GoLLRB, allowing it to serve as a drop-in replacement for LLRB trees.

## Use cases
- store sorted key-value data in memory in Go
- replace gollrb trees with a faster ordered structure
- implement ordered indexes for in-memory databases
- iterate over keys in sorted order efficiently
- build range queries over mutable ordered data

## When to choose
- you need an ordered, mutable in-memory data structure in Go
- you want a drop-in replacement for GoLLRB
- you need efficient sorted iteration and range scans

## When to avoid
- you need persistent on-disk storage
- you only need a simple map without ordering
- you are not programming in Go

## Facets
- artifact type: library
- maturity: stable
- function: database
- domain: developer-tools
- platform: go
- tags: b-tree, data-structures, in-memory, ordered-map, algorithms

## Member repositories
- google/btree (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:37.783318+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:22:48.121942+00:00, confidence not recorded.
  - readme: https://github.com/google/btree (fetched 2026-08-28T04:08:37.783318+00:00, sha 14559a319e34)
- Data as of 2026-08-30T08:39:29.467469+00:00.
