weighted_trie
🦀 Rust crate that allows creating weighted prefix trees that can be used in autocomplete
Quickstart
To use weigthed-trie, add the following to your Cargo.toml file:
[]
= "0.1.0" # NOTE: Replace to latest minor version.
Usage overview
use WeightedTrie;
Alternatively you can use .build
method
use ;
Benchmarks
Using 100k weighted strings
weighted_trie/insert time: [342.41 ms 343.86 ms 345.56 ms]
weighted_trie/lookup time: [1.8608 ms 1.9351 ms 2.0834 ms]
weighted_trie/build time: [326.27 ms 330.74 ms 337.03 ms]
Guidelines
README.md
is generated from cargo readme
command.
Do not manually update README.md
instead edit src/lib.rs
and then run cargo readme > README.md
.
TODO:
Add testsBenchmark lookup speedBenchmark insert speed- Measure memory footprint
- Try low hanging fruit optimizations like usage of
hashbrown
instead of standart HashMap
License
License: Apache-2.0