Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. go-adaptive-radix-tree

go-adaptive-radix-tree

MITGov2.0.4

A high-performance, memory-efficient Go implementation of Adaptive Radix Trees with zero-allocation searches and ordered iteration.

GitHubGitHub
413 stars63 forks0 contributors

What is go-adaptive-radix-tree?

go-adaptive-radix-tree is a Go implementation of the Adaptive Radix Tree (ART), a data structure designed for efficient in-memory indexing of keys. It provides high-performance search, insertion, and deletion operations while maintaining keys in sorted order, enabling additional operations like range scans and prefix lookups that hash tables cannot support.

Target Audience

Go developers building systems requiring fast in-memory indexing with ordered data access patterns, such as databases, search engines, or applications needing prefix-based autocomplete functionality.

Value Proposition

Developers choose this library for its combination of hash-table-like performance with the ordered iteration capabilities of trees, plus its specific optimization of zero memory allocations during searches, which outperforms other Go ART implementations.

Overview

Adaptive Radix Trees implemented in Go

Use Cases

Best For

  • Implementing in-memory indexes for databases or search engines
  • Building autocomplete systems with prefix-based lookup
  • Applications requiring range queries over string or byte array keys
  • Systems needing ordered iteration over large key sets
  • Memory-constrained environments requiring space-efficient data structures
  • High-performance applications where zero-allocation searches are critical

Not Ideal For

  • Applications requiring persistent storage out-of-the-box without additional disk I/O code
  • Projects where unordered hash tables suffice and sorted operations like range scans are never needed
  • Systems needing built-in thread-safe concurrent read-write access without manual synchronization
  • Scenarios with datasets larger than available RAM, as this is an in-memory structure

Pros & Cons

Pros

Zero-Allocation Searches

Search operations incur zero memory allocations, as benchmarked against go-art, reducing garbage collection overhead and improving lookup performance.

Sorted Order Maintenance

Keys are stored lexicographically, enabling efficient range scans, prefix lookups, and ordered iteration—features hash tables lack.

Memory-Efficient Design

Uses adaptive node sizes to minimize memory overhead, making it space-optimized compared to other tree implementations.

Flexible Key Support

Accepts any byte array as keys, including those with null bytes, allowing for versatile data encoding without restrictions.

Cons

Insertion Allocation Overhead

Insert operations involve memory allocations, as shown in benchmarks (e.g., 1.2M allocs for 235K words), which can impact write-heavy workloads.

No Built-in Concurrency

The library does not provide thread-safe operations, requiring developers to implement external synchronization for concurrent access, adding complexity.

Niche Use Case Focus

Specialized for in-memory indexing with sorted access; not suitable for persistent storage or as a general-purpose replacement for all map scenarios.

Frequently Asked Questions

Quick Stats

Stars413
Forks63
Contributors0
Open Issues0
Last commit5 months ago
CreatedSince 2016

Tags

#trie#search-algorithms#go-library#data-structures#zero-allocation#go#memory-optimization

Built With

G
Go

Included in

Go169.1k
Auto-fetched 21 hours ago

Related Projects

blevebleve

A modern text/numeric/geo-spatial/vector indexing library for go

Stars11,033
Forks700
Last commit12 days ago
trietrie

Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching.

Stars789
Forks115
Last commit3 months ago
go-edlibgo-edlib

📚 String comparison and edit distance algorithms library, featuring : Levenshtein, LCS, Hamming, Damerau levenshtein (OSA and Adjacent transpositions algorithms), Jaro-Winkler, Cosine, etc...

Stars599
Forks28
Last commit3 months ago
levenshteinlevenshtein

Go implementation to calculate Levenshtein Distance.

Stars469
Forks29
Last commit2 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub