Crates.io | rbtree-arena |
lib.rs | rbtree-arena |
version | 0.1.0 |
source | src |
created_at | 2023-11-08 18:35:14.044588 |
updated_at | 2023-11-08 18:35:14.044588 |
description | A cache friendly red black tree where nodes live on sequential memory. |
homepage | https://github.com/tontinton/dbeel/rbtree_arena |
repository | https://github.com/tontinton/dbeel/rbtree_arena |
max_upload_size | |
id | 1029249 |
size | 26,178 |
A cache friendly red black tree implementation that allocates a single vector of nodes.
Example:
use rbtree_arena::RedBlackTree;
let mut tree = RedBlackTree::with_capacity(4);
tree.set(100, "very")?;
tree.set(50, "Trees")?;
tree.set(75, "are")?;
tree.set(150, "cool!")?;
for (k, v) in tree {
println!("{}: {}", k, v);
}
Outputs:
50: Trees
75: are
100: very
150: cool!