greyblake / whatlang-rs

Natural language detection library for Rust. Try demo online: https://whatlang.org/

Home Page:https://whatlang.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Try to get rid of hashbrown

greyblake opened this issue · comments

Try to use std::collections::HashMap.
Do benchmark, to ensure there is no regression in performance

Pinging this issue @greyblake , as since Rust 1.36, hashbrown is now the HashMap implementation of the Rust standard library.

And the hashbrown folks benchmarked it too - https://github.com/rust-lang/hashbrown#performance

@jqnatividad Thanks, I know.
I've tried to switch to std HashMap, but it hits performance, I am not sure exactly why.
You can also give it a try if you want to.

Hi @greyblake , I went ahead as you suggested, but decided to bump hashbrown, and several other dependencies to their latest release.

It does not look like hashbrown will go anywhere, benchmarks show that with std::collections::HashMap the detect() function is 2x slower.
See #119