Skip to content

Comments

bench: add subcall benchmarks (1000-call variants)#3427

Merged
rakita merged 3 commits intomainfrom
subcall-bench
Feb 16, 2026
Merged

bench: add subcall benchmarks (1000-call variants)#3427
rakita merged 3 commits intomainfrom
subcall-bench

Conversation

@rakita
Copy link
Member

@rakita rakita commented Feb 16, 2026

Summary

  • Add three subcall benchmark variants to revme bench for measuring CALL opcode performance
  • subcall_1000_transfer_1wei: 1000 subcalls each transferring 1 wei (measures value transfer overhead)
  • subcall_1000_same_account: 1000 subcalls with no value to same account (baseline subcall cost)
  • subcall_1000_nested: 1000 subcalls where each target does another subcall (measures nested call frame overhead)

Test plan

  • cargo build -p revme compiles successfully
  • cargo run -p revme --release -- bench subcall runs all 3 variants (~157-299µs per iteration)

Add three subcall benchmark variants to measure CALL opcode performance:
- subcall_1000_transfer_1wei: 1000 subcalls each transferring 1 wei
- subcall_1000_same_account: 1000 subcalls with no value transfer
- subcall_1000_nested: 1000 subcalls where each target does another subcall
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 16, 2026

Merging this PR will improve performance by 3.72%

⚡ 2 improved benchmarks
✅ 171 untouched benchmarks
🆕 3 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
transfer 14.1 µs 13.6 µs +3.72%
🆕 subcall_1000_transfer_1wei N/A 1.2 ms N/A
🆕 subcall_1000_nested N/A 2.1 ms N/A
🆕 subcall_1000_same_account N/A 1.1 ms N/A
transfer_finalize 17.5 µs 17 µs +3.39%

Comparing subcall-bench (cb82522) with main (0b34496)

Open in CodSpeed

Replace Vec::new() + push() with vec![] macro to fix vec_init_then_push
warnings, and add subcall benchmarks to the criterion entry point.
@rakita
Copy link
Member Author

rakita commented Feb 16, 2026

Just a bench in revme, it does not touch crates at all

@rakita rakita merged commit a350c9e into main Feb 16, 2026
31 checks passed
@rakita rakita deleted the subcall-bench branch February 16, 2026 08:38
@github-actions github-actions bot mentioned this pull request Feb 16, 2026
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