Buzzword is lock-free Bw-Tree (paper) implementation that supports fast insertions/queries of billions of key-value pairs.
let tree = BwTree::new(1024 * 1024 /* mapping table size */);
tree.insert(&1, "alice");
tree.insert(&2, "bob");
let vals = tree.get_values(&1);
assert_eq!(vals.len(), 1);
assert_eq!(vals[0], "alice");
for (k, v) in &tree {
println!("{} -> {}", k, v);
}
assert!(tree.delete(&1, &"alice"));
On Intel(R) Xeon(R) Gold 6230 (80 threads):
Workload | Avg. Throughput (MOp/s) |
---|---|
1B (u32, u32) concurrent insert | 11.53 |
1B (u32, u32) concurrent seq. scan | 78.52 |
1B (u32, u32) concurrent delete | 13.49 |