Skip to content

perf: use fixed bytes hashmaps from alloy-core#3358

Merged
DaniPopes merged 2 commits intomainfrom
danipopes/alloy-fixed-bytes-maps
Jan 27, 2026
Merged

perf: use fixed bytes hashmaps from alloy-core#3358
DaniPopes merged 2 commits intomainfrom
danipopes/alloy-fixed-bytes-maps

Conversation

@gakonst
Copy link
Collaborator

@gakonst gakonst commented Jan 27, 2026

Follow-up to #3231 that makes use of alloy-core fixed bytes hashmaps throughout the code for Address, U256, and B256 keys.

Re-implementation of #3238 rebased on main.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 27, 2026

CodSpeed Performance Report

Merging this PR will improve performance by 20.78%

Comparing danipopes/alloy-fixed-bytes-maps (0b1ae86) with main (087ac46)

Summary

⚡ 130 improved benchmarks
✅ 43 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
ADDMOD_50 28.3 µs 27.2 µs +3.75%
CALLDATASIZE_50 18.8 µs 17.8 µs +5.58%
ADDRESS_50 18.9 µs 17.9 µs +6.05%
ADD_50 24 µs 23 µs +4.32%
AND_50 24 µs 23 µs +4.18%
CALLVALUE_50 18.8 µs 17.8 µs +5.75%
CALL_50 96 µs 90.6 µs +5.97%
PUSH13_50 19.3 µs 18.2 µs +5.93%
CHAINID_50 18.8 µs 17.8 µs +5.92%
PUSH14_50 19.3 µs 18.3 µs +5.42%
PUSH15_50 19.4 µs 18.4 µs +5.55%
CODESIZE_50 19 µs 17.9 µs +6.37%
PUSH16_50 19.3 µs 18.2 µs +5.6%
BYTE_50 24.3 µs 23.3 µs +4%
PUSH17_50 19.5 µs 18.4 µs +5.71%
CLZ_50 24.4 µs 23.3 µs +4.64%
COINBASE_50 18.9 µs 17.8 µs +6.23%
PUSH1_50 18.8 µs 17.8 µs +6.09%
PUSH18_50 19.4 µs 18.4 µs +5.39%
PUSH20_50 19.4 µs 18.4 µs +5.22%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@DaniPopes DaniPopes requested a review from rakita January 27, 2026 16:29
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.

lgtm

@DaniPopes DaniPopes merged commit 3f37ac5 into main Jan 27, 2026
31 checks passed
@github-actions github-actions bot mentioned this pull request Jan 26, 2026
@rakita rakita deleted the danipopes/alloy-fixed-bytes-maps branch January 27, 2026 21:00
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