Skip to content
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

perf: enable map-foldhash alloy-primitives feature globally #13278

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Dec 10, 2024

This is the default hasher in hashbrown. It is seeded randomly, and a lot faster than ahash and the standard's default siphash.

Improves sparse trie benchmarks by 10-12%. Likely benefits EVM by some small percentage as well.

calculate root from leaves/hash builder/1000                                                                           
                        time:   [458.34 µs 458.72 µs 459.18 µs]
                        change: [+1.2963% +1.6696% +1.9964%] (p = 0.00 < 0.05)
                        Performance has regressed.
calculate root from leaves/sparse trie/1000                                                                            
                        time:   [752.41 µs 753.01 µs 753.77 µs]
                        change: [-12.536% -12.005% -11.650%] (p = 0.00 < 0.05)
                        Performance has improved.
calculate root from leaves/hash builder/5000                                                                            
                        time:   [2.2433 ms 2.2463 ms 2.2486 ms]
                        change: [-2.4751% -2.1575% -1.8610%] (p = 0.00 < 0.05)
                        Performance has improved.
calculate root from leaves/sparse trie/5000                                                                            
                        time:   [4.7486 ms 4.8002 ms 4.8398 ms]
                        change: [-12.172% -11.112% -10.268%] (p = 0.00 < 0.05)
                        Performance has improved.

Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@DaniPopes DaniPopes added this pull request to the merge queue Dec 11, 2024
Merged via the queue into main with commit 7b9ca0a Dec 11, 2024
43 checks passed
@DaniPopes DaniPopes deleted the dani/foldhash branch December 11, 2024 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants