rbtree-arena

Crates.iorbtree-arena
lib.rsrbtree-arena
version0.1.0
sourcesrc
created_at2023-11-08 18:35:14.044588
updated_at2023-11-08 18:35:14.044588
descriptionA cache friendly red black tree where nodes live on sequential memory.
homepagehttps://github.com/tontinton/dbeel/rbtree_arena
repositoryhttps://github.com/tontinton/dbeel/rbtree_arena
max_upload_size
id1029249
size26,178
Tony Solomonik (tontinton)

documentation

README

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!
Commit count: 454

cargo fmt