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

v2.2: accounts-db: Use NoHashHasher in AccountStorageMap (backport of #4822) #4920

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Feb 11, 2025

Problem

DashMap uses SipHash by default. AccountStorageMap uses Slot as a key and therefore it doesn't have any chance of collisions.

Summary of Changes

We can skip hashing the key entirely.

Ref #4276


This is an automatic backport of pull request #4822 done by [Mergify](https://mergify.com).

`DashMap` uses SipHash by default. `AccountStorageMap` uses `Slot` as a
key and therefore it doesn't have any chance of collisions. We can skip
hashing the key entirely.

(cherry picked from commit cd04323)
@brooksprumo
Copy link

Justification to backport:

We're very early in the v2.2 branch, and this is a simple change to improve the performance of the hashing for the map that does Slot -> AccountStorageEntry lookups.

@brooksprumo brooksprumo requested a review from a team February 11, 2025 14:21
@brooksprumo brooksprumo merged commit b5025ee into v2.2 Feb 11, 2025
46 checks passed
@brooksprumo brooksprumo deleted the mergify/bp/v2.2/pr-4822 branch February 11, 2025 21: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.

3 participants