Skip to content

Comments

perf(database): use fixed hashmaps in cache db#3231

Merged
rakita merged 2 commits intomainfrom
alexey/cache-db-maps
Dec 18, 2025
Merged

perf(database): use fixed hashmaps in cache db#3231
rakita merged 2 commits intomainfrom
alexey/cache-db-maps

Conversation

@shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Dec 17, 2025

Alloy provides specialized hashmap types for fixed byte keys, such as Address and B256. We should use them for CacheDB.

@shekhirin shekhirin force-pushed the alexey/cache-db-maps branch from aaae91e to ced2552 Compare December 17, 2025 12:40
@shekhirin shekhirin force-pushed the alexey/cache-db-maps branch from ced2552 to f8578bb Compare December 17, 2025 12:40
@shekhirin shekhirin changed the title perf(database): cache db fixed hash maps perf(database): use fixed hashmaps in cache db Dec 17, 2025
@shekhirin shekhirin marked this pull request as ready for review December 17, 2025 12:46
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 17, 2025

CodSpeed Performance Report

Merging #3231 will not alter performance

Comparing alexey/cache-db-maps (aaedf6f) with main (436cd99)

Summary

✅ 173 untouched

@shekhirin shekhirin requested review from DaniPopes and rakita and removed request for DaniPopes December 17, 2025 13:08
Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

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

awesome

Copy link
Collaborator

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

lgtm, new deps are all optional

@rakita
Copy link
Member

rakita commented Dec 18, 2025

Would be good to explore if we can use these more. @DaniPopes, how do they specialise, use a different hasher?

@rakita rakita merged commit 500d68a into main Dec 18, 2025
31 checks passed
@github-actions github-actions bot mentioned this pull request Dec 18, 2025
@DaniPopes DaniPopes deleted the alexey/cache-db-maps branch December 19, 2025 00:51
Rjected pushed a commit to Rjected/revm that referenced this pull request Dec 19, 2025
* perf(database): cache db fixed hash maps

* bump alloy deps
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