Closed greyblake closed 2 years ago
This a code changes for https://github.com/greyblake/whatlang-rs/issues/98
running 4 tests test bench_alphabet_cyrillic_calculate_scores ... bench: 2,157 ns/iter (+/- 23) test bench_alphabet_latin_calculate_scores ... bench: 2,431 ns/iter (+/- 80) test bench_detect ... bench: 4,254,212 ns/iter (+/- 108,815) test bench_detect_script ... bench: 107,647 ns/iter (+/- 2,975)
test bench_alphabet_cyrillic_calculate_scores ... bench: 1,937 ns/iter (+/- 372) test bench_alphabet_latin_calculate_scores ... bench: 2,206 ns/iter (+/- 81) test bench_detect ... bench: 9,446,431 ns/iter (+/- 147,967) test bench_detect_script ... bench: 111,002 ns/iter (+/- 4,825)
detect() becomes 2x slower when with std::collections::HashMap.
detect()
std::collections::HashMap
This a code changes for https://github.com/greyblake/whatlang-rs/issues/98
Benchmarks
hashbrown::HashMap
std::collections::HashMap
detect()
becomes 2x slower when withstd::collections::HashMap
.