Skip to content

perf: pool Stack buffer allocations#2615

Closed
DaniPopes wants to merge 5 commits intobluealloy:mainfrom
DaniPopes:dani/stack-pool
Closed

perf: pool Stack buffer allocations#2615
DaniPopes wants to merge 5 commits intobluealloy:mainfrom
DaniPopes:dani/stack-pool

Conversation

@DaniPopes
Copy link
Copy Markdown
Collaborator

@DaniPopes DaniPopes commented Jun 10, 2025

Complete implementation, WIP code structure: pls advise @rakita

Ideally it would be Pool<Stack> but importing Stack would be a dependency cycle, so we have to transmute the reference from Vec to Stack

Even more ideally Pool doesn-t exist and the Frame stack is re-used by clearing the frame and passing a &mut to initialize it, but this is very invasive...

edit: done here #2617

@DaniPopes DaniPopes force-pushed the dani/stack-pool branch 3 times, most recently from c16f42f to 964d821 Compare June 10, 2025 12:55
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jun 10, 2025

CodSpeed Performance Report

Merging #2615 will improve performances by 19.49%

Comparing DaniPopes:dani/stack-pool (90d4406) with main (c9a017a)

Summary

⚡ 132 improvements
✅ 31 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
ADDMOD_50 35.7 µs 33.7 µs +5.97%
ADDRESS_50 22.5 µs 20.4 µs +10.74%
ADD_50 28.2 µs 25.8 µs +9.03%
AND_50 28.1 µs 25.9 µs +8.55%
BYTE_50 28.5 µs 26.4 µs +8.18%
CALLDATACOPY_50 62.2 µs 60 µs +3.66%
CALLDATALOAD_50 62.7 µs 60.5 µs +3.63%
CALLDATASIZE_50 22.4 µs 20.2 µs +11.17%
CALLER_50 22.5 µs 20.4 µs +10.44%
CALLVALUE_50 22.4 µs 20.3 µs +10.33%
CALL_50 131.7 µs 113.2 µs +16.35%
CHAINID_50 22.4 µs 20.3 µs +10.32%
CODESIZE_50 22.9 µs 20.4 µs +12.21%
COINBASE_50 22.5 µs 20.3 µs +10.74%
CREATE_50 454.8 µs 427.7 µs +6.31%
DELEGATECALL_50 123.4 µs 107.3 µs +15.02%
DIFFICULTY_50 22.7 µs 20.5 µs +10.97%
DIV_50 30.5 µs 28.5 µs +7.06%
DUP10_50 27.4 µs 25.9 µs +5.66%
DUP11_50 27.6 µs 26.1 µs +5.51%
... ... ... ... ...

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

@DaniPopes DaniPopes force-pushed the dani/stack-pool branch 2 times, most recently from 67aacc1 to 63d303f Compare June 10, 2025 13:09
@DaniPopes
Copy link
Copy Markdown
Collaborator Author

Subsumed by #2617

@DaniPopes DaniPopes closed this Jun 12, 2025
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.

1 participant