Skip to content

perf: wire shared stack arena into frame creation #3399

Open
malik672 wants to merge 22 commits intobluealloy:mainfrom
malik672:river_lea
Open

perf: wire shared stack arena into frame creation #3399
malik672 wants to merge 22 commits intobluealloy:mainfrom
malik672:river_lea

Conversation

@malik672
Copy link
Contributor

@malik672 malik672 commented Feb 4, 2026

Threads the pre-allocated arena buffer (Arc<Vec<U256>>) from Evm through the frame creation chain. Nested CALL/CREATE frames now use Stack::new_with_arena instead of allocating a fresh Vec per frame.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 4, 2026

Merging this PR will improve performance by 4.44%

⚡ 13 improved benchmarks
✅ 160 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
ADDRESS_50 18.1 µs 17.5 µs +3.4%
CALLDATASIZE_50 18 µs 17.4 µs +3.09%
ORIGIN_50 18.1 µs 17.5 µs +3.07%
CALLER_50 18.1 µs 17.5 µs +3.4%
NUMBER_50 18 µs 17.4 µs +3.25%
CODESIZE_50 18 µs 17.4 µs +3.42%
PUSH12_50 18.3 µs 17.8 µs +3.19%
PUSH14_50 18.5 µs 17.9 µs +3.16%
PUSH18_50 18.7 µs 18 µs +3.47%
PUSH22_50 18.8 µs 18.2 µs +3.28%
GASPRICE_50 18.2 µs 17.6 µs +3.39%
PUSH23_50 18.9 µs 18.3 µs +3.26%
EXTCODEHASH_50 39.4 µs 37.7 µs +4.44%

Comparing malik672:river_lea (d80b426) with main (540ec38)

Open in CodSpeed

@malik672 malik672 force-pushed the river_lea branch 7 times, most recently from 7437435 to 1f6238d Compare February 6, 2026 03:41
@malik672
Copy link
Contributor Author

malik672 commented Feb 6, 2026

validate.env is the new bottleneck

@malik672
Copy link
Contributor Author

malik672 commented Feb 6, 2026

clearly the benchmark might not show it but a significant number of txs on mainnet are type 2

@malik672 malik672 force-pushed the river_lea branch 3 times, most recently from 53b2d84 to 730299c Compare February 7, 2026 05:54
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