Use rustc-hash for the hottest hashmaps #40
No reviewers
Labels
No labels
Compat/Breaking
Kind
Bad merge
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
New language
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: mergiraf/mergiraf#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Noratrieb/mergiraf:speedy-hash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Most of the time in the program is spent hashing things for hashmaps in
the matcher. It's currently using the default Rust hasher, which is
SipHash1-3. SipHash1-3 is not known for being particularly fast
(instead, it excels at its security properties).
I have tested several hashers to compare it,
foldhash
(0.1.3) fast andquality,
fxhash
(0.2.1) andrustc-hash
(2.0.0).We instead use the
rustc-hash
crate which provides a very fast hash.While
fxhash
performs equally well, that crate is not maintained, while rustc-hash is.The benchmarking was performed on top of
e6b3b34abd
(#39) (which adds DFSprecomputation).
The benchmark data was the same, a ~4k loc PNPM YAML lockfile with a
one-line change/conflict.
7de1ae3094
to3a2b16a352
Use FxHash for the hottest hashmapsto Use rustc-hash for the hottest hashmaps3a2b16a352
tod97ee54ea3
Really nice too! The speedup is impressive and the change feels intuitively sensible. Thank you!
d97ee54ea3
to3980d3e340