Skip to content

A fast, memory-efficient radix tree implementation in Rust

License

Notifications You must be signed in to change notification settings

marekgalovic/radixt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crates Docs CI License

Radix Tree RS

A fast, memory-efficient radix tree implementation in Rust.

Examples

use radixt::RadixMap;

let mut map = RadixMap::new();

map.insert("bar", 1);
map.insert("baz", 2);
map.insert("foo", 2);

assert_eq!(map.len(), 3);

assert_eq!(map.get("bar"), Some(&1));
assert_eq!(map.get("baz"), Some(&2));
assert_eq!(map.get("foo"), Some(&3));

Benchmarks

enwiki-latest-all-titles googlebooks-eng-all-5gram
Time (s) Max RSS (MB) Time (s) Max RSS (MB)
RadixSet 5.74 558.65 3.31 283.25
HashSet 6.37 2062.06 3.62 1205.06
BTreeSet 6.05 1276.07 2.76 867.42

The results above were obtained using examples/insert_lines.rs with data downloaded using:

# enwiki-latest-all-titles
$ curl -s https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-all-titles-in-ns0.gz | gzip -d > enwiki-latest-all-titles-in-ns0
# googlebooks-eng-all-5gram
$ curl -s http://storage.googleapis.com/books/ngrams/books/googlebooks-eng-all-5gram-20120701-0.gz | gzip -d > googlebooks-eng-all-5gram-20120701-0

About

A fast, memory-efficient radix tree implementation in Rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages