rushmorem / publicsuffix

An implementation of Mozilla's Public Suffix List in Rust
MIT License
97 stars 17 forks source link

Bump hashbrown from 0.11.2 to 0.12.1 #36

Closed jqnatividad closed 2 years ago

jqnatividad commented 2 years ago

First off @rushmorem , thanks for this crate! Sending this small PR to bump hashbrown

BlackDex commented 2 years ago

It would be nice for this to be updated to the latest version. A lot of other crates already have updated to this version.

The only thing which probably need to be done is bump the MSRV to 1.56 and some other changes? @rushmorem is that something you would consider?

rushmorem commented 2 years ago

Thank you @jqnatividad. I'm sorry for the late response. I have been so tied up at work, I totally forgot about this PR.

rushmorem commented 2 years ago

v2.2.0 is now out. Heads up: I switched the hasher from our fork of fxhash to ahash, which is hashbrown's default. This change caused a performance regression as follows:-

With aHash:

test bench_domain ... bench:          42 ns/iter (+/- 19)
test bench_find   ... bench:          30 ns/iter (+/- 2)
test bench_suffix ... bench:          38 ns/iter (+/- 1)

With FxHash:

test bench_domain ... bench:          25 ns/iter (+/- 1)
test bench_find   ... bench:          17 ns/iter (+/- 0)
test bench_suffix ... bench:          17 ns/iter (+/- 1)

If such a regression is unacceptable for you, let me know.

BlackDex commented 2 years ago

@rushmorem not sure it will have a huge impact. The only impact i see in the changes you committed is the cargo upgrade, which now pins those versions to there patch level instead of there minor.

rushmorem commented 2 years ago

not sure it will have a huge impact

Awesome!

The only impact i see in the changes you committed is the cargo upgrade, which now pins those versions to there patch level instead of there minor.

Not necessarily. Cargo versions default to ^ rather than =. It will still accept newer non-breaking versions of those crates. To pin to a specific hashbrown dependency, for example, I would have to use =0.12.3 instead.