This package is a high-performance, in-memory B-tree for Go that implements an ordered set/map with efficient insert, delete, and range iteration. It’s parameterized by tree degree so callers can tune cache behavior and memory overhead for their workload. Instead of relying on Go’s built-in maps—which are hash-based and unordered—btree preserves sorted order and provides rich traversal APIs like ascending, descending, and range scans. The implementation favors minimal allocations and locality, making it attractive for indexing, query engines, and caches that need predictable iteration costs. A simple Item interface with a Less method defines ordering, keeping the API small and flexible for custom types. The library includes benchmarks and optional freelists so users can trade memory reuse for speed in hot paths.

Features

  • Ordered set/map semantics with fast range iteration
  • Efficient insert, delete, get, and replace operations
  • Tunable node degree to balance speed and memory locality
  • Ascend/Descend and range-bounded traversal callbacks
  • Minimal allocations with optional freelist reuse
  • Small, idiomatic API using a Less interface for custom ordering

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow BTree implementation for Go

BTree implementation for Go Web Site

Other Useful Business Software
Loan management software that makes it easy. Icon
Loan management software that makes it easy.

Ideal for lending professionals who are looking for a feature rich loan management system

Bryt Software is ideal for lending professionals who are looking for a feature rich loan management system that is intuitive and easy to use. We are 100% cloud-based, software as a service. We believe in providing our customers with fair and honest pricing. Our monthly fees are based on your number of users and we have a minimal implementation charge.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of BTree implementation for Go!

Additional Project Details

Programming Language

Go

Related Categories

Go Libraries

Registered

2025-10-09