docs.rs failed to build flat_rbtree-0.2.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
flat_rbtree-0.2.3
flat_rbtree
A fast, index-based Red-Black Tree with no heap allocations — ideal for systems where performance and memory layout matter.
See Documentation
Features
- Flat storage: all nodes are stored in a
array, avoiding pointer indirection. - No allocations per node: avoids
Box,Rc, orArc. - No-std: works in embedded or bare-metal environments without relying on the Rust standard library..
- Preallocated with MaybeUninit: memory for all nodes is allocated upfront, minimizing runtime overhead and ensuring safe initialization.
- Fixed capacity: tree size is bounded at compile-time, making resource usage predictable.
expandedfeature (optional): enables tracking of subtree sizes for each node, allowing support forrank,select, andrange_countqueries.
Simple usage
use RedBlackTree;
let mut tree = new;
tree.insert;
tree.insert;
tree.insert;
tree.update;
if let Some = tree.search
for in tree.iter
tree.remove;
if !tree.contains_key
Benchmark: flat_rbtree vs rbtree (10,000 operations)
Since all operations are at most O(log n), this benchmark is just to give an idea of the performance compared to a pointer-based implementation.
| Operation | flat_rbtree | rbtree |
|---|---|---|
| Insert | 1.14 ms | 1.34 ms |
| Remove | 2.12 ns | 354 ps |
| Search | 655 µs | 514 µs |
📝 License
This project is open-source under the MIT License.