Skip to content

Commit

Permalink
update prefix crate
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiscode committed Feb 1, 2024
1 parent 5184000 commit 9d01f8c
Show file tree
Hide file tree
Showing 2 changed files with 100,002 additions and 2 deletions.
4 changes: 2 additions & 2 deletions text-utils-prefix/benches/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ use patricia_tree::PatriciaMap;

fn bench_prefix(c: &mut Criterion) {
let dir = env!("CARGO_MANIFEST_DIR");
let index = fs::read_to_string(PathBuf::from(dir).join("resources/test/index.txt"))
let index = fs::read_to_string(PathBuf::from(dir).join("resources/test/index.100k.txt"))
.expect("failed to read file");
let words: Vec<_> = index.lines().map(|s| s.as_bytes()).take(100_000).collect();
let words: Vec<_> = index.lines().map(|s| s.as_bytes()).collect();
let mut rng = ChaCha8Rng::seed_from_u64(22);
// sample random word from all words
let word = *words.choose(&mut rng).unwrap();
Expand Down
Loading

0 comments on commit 9d01f8c

Please sign in to comment.