Skip to content

perf(evm): fold edge coverage optimizations#15556

Draft
decofe wants to merge 8 commits into
masterfrom
centaur/fold-perf-edge-coverage-1783053299
Draft

perf(evm): fold edge coverage optimizations#15556
decofe wants to merge 8 commits into
masterfrom
centaur/fold-perf-edge-coverage-1783053299

Conversation

@decofe

@decofe decofe commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Folds the edge-coverage-related draft perf PRs into one reviewable PR:

The folded changes are limited to edge coverage collection and cmp-log bookkeeping:

  • pass already-loaded opcodes into edge/cmp helpers and inline hot helpers
  • pre-size dense edge maps for collision-free coverage
  • compact optional call-depth storage
  • use entry APIs for cmp site and dense edge counts
  • cache consecutive cmp-log sites

Validation:

  • cargo fmt --all
  • cargo test -p foundry-evm edge_cov --lib

Prompted by: @grandizzy

@mablr

mablr commented Jul 3, 2026

Copy link
Copy Markdown
Member

I benchmarked the edge-coverage changes against origin/master with temporary targeted microbench tests inside the affected edge_cov.rs module, built with Foundry's profiling profile. I avoided full scfuzzbench here because a short campaign was noisy and dominated by setup/build work; these microbenches isolate the changed hot paths directly.

Results:

Benchmark master this PR delta
repeated cmp-site logging 8.526 ns/op 8.353 ns/op ~2.0% faster
dense edge hits 15.564 ns/op 15.585 ns/op neutral

Recommendation: merge, but I would describe the performance impact as modest. The repeated cmp-site path shows a small targeted win, while dense edge storage is effectively neutral in this synthetic benchmark. The implementation still looks directionally reasonable for a hot path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants