bitmaptrie 2.0.0

Bitmapped vector trie (mutable, not persistent). Word-size path-cached indexing into essentially a sparse vector. Requires rust-nightly.
bitmaptrie-2.0.0 doesn't have any documentation.

A bitmapped vector trie for Rust

Build Status Latest Version

Documentation

Requires Rust-nightly due to use of low-level unstable APIs.

This is a non-persistent bitmapped vector trie with word-size indexing: thus on a 32-bit system the indexing is 32 bits; on 64-bit it is 64 bits.

It essentially behaves as an unbounded (except by the word-size index) sparse vector.

Performance is good for spatially-close accesses but deteriorates for random spatially-sparse accesses. Performance improves significantly if compiled with popcnt and lzcnt instructions. See wiki for more.

The last access path is cached to accelerate the next nearby access.

Multi-path-cache methods are available for accelerating read-only accesses at multiple positions but the current design causes write performance to degrade.

Usage

extern crate bitmaptrie;
use bitmaptrie::Trie;

fn main() {
    let mut trie: Trie<String> = Trie::new();

    trie.set(123usize, "testing 123".to_owned());

    if let Some(value) = trie.get_mut(123) {
        *value = "test pass".to_owned();
    }
}

Author

Peter Liniker

License

Dual MIT/Apache 2.0