| Crates.io | allocated-btree |
| lib.rs | allocated-btree |
| version | 0.1.3 |
| created_at | 2025-12-28 19:05:35.177932+00 |
| updated_at | 2026-01-16 07:52:01.187985+00 |
| description | B-Tree data structures with explicit allocator control using the allocated pattern |
| homepage | https://github.com/alexchamberlain/allocated-btree |
| repository | https://github.com/alexchamberlain/allocated-btree |
| max_upload_size | |
| id | 2009274 |
| size | 472,242 |
An implementation of a B-Tree using the allocated pattern.
This crate provides 2 main interfaces:
allocated_btree::AllocatedNaiveBTreeMap - a naive BTree that uses a single node shapeallocated_btree::AllocatedCompressedBTreeMap - a compressed BTree that uses an optimised leaf nodeThe compressed data structure uses around 50% of the memory of the naive data structure.
Most of this code was written before code generating AI was widespread. However, Claude Code has been used to fix a couple of bugs, fix typos and improve the documentation since then.
The main motivation for this crate is to serve as an example of how to use the allocated crate, especially how to compare 2 data structures using an allocator.
Copyright 2024 Alex Chamberlain
This project is licensed under either of
at your option.