Skip to content

perf(fuzz): share override function lists - #16650

Open
figtracer wants to merge 2 commits into
masterfrom
fig/override-strategy-clones
Open

perf(fuzz): share override function lists#16650
figtracer wants to merge 2 commits into
masterfrom
fig/override-strategy-clones

Conversation

@figtracer

@figtracer figtracer commented Sep 4, 2026

Copy link
Copy Markdown
Member

Share each override target's function list through Arc so generating a call clones a handle instead of every function and ABI parameter. Target selection, fallback selection, public APIs, and shrinking remain unchanged. The regression test covers target changes, unknown-target fallback, valid calldata, and shrinking; a separate comparison matched 256 seeded baseline/candidate sequences and their shrink steps. Code, tests, and benchmark analysis were produced with Codex assistance.

Results

Compared with master 2492dc059 using the profiling build on Apple Silicon. The synthetic foundry-scfuzzbench workload has 128 handler functions, call overrides enabled, depth 64, one worker, seed 0x1234, and a fresh corpus. Each revision ran one 20-second campaign. Generation timings are medians of nine alternating batches of 2,000 calls, with three ABI parameters per function.

Measurement master this PR Change
Campaign wall time 20.01 s 20.01 s Fixed time budget
Campaign calls completed 454,848 674,496 +48.3%
Runner-reported throughput 22,573 calls/s 33,570 calls/s +48.7%
Reverted calls 32 (0.0070%) 57 (0.0085%) Single-run rates
Observed edges / features 98 / 180 98 / 180 Unchanged
Generation, 16 functions 3.97 µs 2.49 µs 1.59× faster
Generation, 128 functions 13.92 µs 2.52 µs 5.52× faster
Generation, 1,024 functions 92.50 µs 2.63 µs 35.22× faster

These gains are specific to synthetic call-override workloads; the one-function generation case was effectively neutral. Campaign variance across runs and projects remains unmeasured.

Store each override target's functions in an Arc so each generated call
clones a shared handle instead of every function and ABI parameter.
Preserve the existing target selection, fallback, and shrinking behavior.

In a profiling-build generation microbenchmark against master 2492dc0,
128-function targets fell from 13.92 us to 2.52 us per call (5.52x), and
1024-function targets fell from 92.50 us to 2.63 us (35.22x). These are
component measurements, not whole-Forge speedups.
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

✅ Changelog found

The deterministic check will validate the changed entry.

@figtracer
figtracer marked this pull request as ready for review September 4, 2026 22:40
Comment thread crates/evm/fuzz/src/strategies/invariants.rs Outdated
DaniPopes
DaniPopes previously approved these changes Sep 4, 2026
mattsse
mattsse previously approved these changes Sep 4, 2026

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@figtracer
figtracer dismissed stale reviews from mattsse and DaniPopes via b4dc0db September 4, 2026 22:59
@figtracer
figtracer enabled auto-merge (squash) September 4, 2026 22:59

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

3 participants