-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Reconsider Choice of HashMap Hasher #6999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
This was referenced Jan 27, 2025
I think I just misclassified this, this isn't exposed to the user. |
|
I think the default hashbrown hasher is a very sensible default. |
https://github.com/xacrimon/dashmap - found this in my GitHub recommendations FWIW |
superdump
pushed a commit
to bevyengine/naga_oil
that referenced
this issue
Mar 22, 2025
`rustc-hash` can't be updated for now because naga/wgpu is still on 1.1 and it's used in some public naga structs that we use gfx-rs/wgpu#6999 Closes #114
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
As discussed for changes proposed in #6938 - #6938 (comment): this project has been using some kind of "fast" hasher from
rustc-hash
v1, which we are now planning to use withhashbrown
, and I have identified some other possible hashers to recommend evaluating:ahash
- used byegui
nohash-hasher
- also used byegui
rustc-hash
v2 - ??? - I found some resources worth checking out:This kind of decision should be backed up with some benchmark testing.
Context: PR #6938 is part of some preparation I am contributing for
no-std
support, as requested in: #6826P.S. I found some older context here, which I would like to comment on:
fxhash
crate was some kind of copy of the hasher fromrustc-hash
. I think it was100%200% correct to drop use of the oldfxhash
in favor ofrustc-hash
. My one issue withrustc-hash
is that it seems to contain bothFxHasher
, which can be used withhashbrown
, andFxHashMap
/FxHashSet
typedefs which are hard-coded to usingstd::collections
. So moving forward, we should userustc_hash::FxHasher
but notrustc_hash::FxHashMap
orrustc_hash::FxHashSet
.P.S. 2: Considering that this could affect API, as Fitzgerald noted with the label, I start to wonder if this could have serious impact on any external users?The text was updated successfully, but these errors were encountered: