Skip to content

ci(benchmark): fetch corpus from published repo (+ via-IR prep) - #527

Draft
nebasuke wants to merge 1 commit into
mainfrom
compile-benchmark-corpus
Draft

ci(benchmark): fetch corpus from published repo (+ via-IR prep)#527
nebasuke wants to merge 1 commit into
mainfrom
compile-benchmark-corpus

Conversation

@nebasuke

@nebasuke nebasuke commented Jul 9, 2026

Copy link
Copy Markdown
Member

This PR will stay in draft for a while, until NomicFoundation/hardhat#8415 is slowly merged into Hardhat (in pieces). This is to prove the concept works, and the approach can be continued in HH3.

Claude summary

Follow-up to #518 (now merged). Two changes to the compile-time benchmark:

  1. Stop vendoring fixtures — fetch the published corpus instead. This is the long-term source the ci: label-gated compile-time benchmark (hyperfine over standard JSON) #518 README already anticipated.
  2. Prep the via-IR pipeline as an opt-in benchmark dimension (off by default; the EVMLA pipeline always runs).

Corpus: fetched, not vendored

The fixtures leave the repo (tests/benchmark/fixtures/ and its manifest.json are deleted). A new Checkout benchmark corpus step pulls them from the hardhat-published corpus repo nomic-foundation-automation/hardhat-benchmark-results, via a non-cone sparse checkout that materializes only the benchmarked files (not the whole corpus). The pinned commit is now the fixtures' provenance — the manifest lives in the corpus repo.

⚠️ Temporary preview location. This pins to the force-pushed solx-corpus-preview branch (hence a commit SHA, not the branch tip). The final home is solx-corpus/ on that repo's main, published from hardhat merge runs — repoint the single ref: line once it's live. The pinned commit will need periodic bumping (or may be GC'd) during this preview phase.

via-IR: prepped, off by default

  • run.sh gains a repeatable --variant (default solx-legacy-dwarf) that selects <scenario>/<variant>.json per scenario. The compiler pipeline is encoded in the standard JSON, so switching variants needs no solx flag.
  • The checkout fetches both the legacy and via-IR variants of the three scenarios, so via-IR is present and ready; it's just not timed by default. A new include_via_ir workflow_dispatch input turns it on.
    • Caveat: workflow_dispatch runs upload the artifact but don't post the PR comment (the comment step is PR-gated). A dedicated label is the path if via-IR-with-comment on a PR is wanted later; kept to the dispatch input here to avoid extra label-gating machinery.
  • report.py drops the hardcoded "EVMLA pipeline" title, since via-IR sections can now appear (each section header already carries the variant).

Fixtures

Same three scenarios timed as before (EVMLA/legacy-DWARF): ens-verifiable-factory-solx (52), openzeppelin-contracts-0.34 (422), uniswap-v4-core-solx (157). aave-v4 is never fetched — its dumps require EVM_DISABLE_MEMORY_SAFE_ASM_CHECK=1, which isn't part of standard JSON, so run.sh's validation pass would abort on it.

Also hardened: --fixtures is now required (the vendored default is gone), and an empty variant resolution fails loudly instead of feeding hyperfine a literal glob.

Validation

  • End-to-end dry run with stubbed solx/hyperfine against a fake corpus: both guards fire (missing --fixtures; unknown variant); default → 2 legacy fixtures; --variant solx-legacy-dwarf --variant solx-via-ir-dwarf → 4 fixtures with correct <scenario>--<variant> naming; report.py renders all sections with the generalized title.
  • bash -n run.sh clean.
  • actionlint clean apart from the pre-existing solx-linux-amd64 custom-runner-label false positive (from the temporary-runner commit on the base branch).

@nebasuke nebasuke added the ci:compile-benchmark Run hyperfine compilation benchmark for this PR label Jul 10, 2026
Stop vendoring the standard-JSON fixtures in tests/benchmark/fixtures and
fetch them from the hardhat-published corpus repo
(nomic-foundation-automation/hardhat-benchmark-results) at a pinned commit,
via a non-cone sparse checkout that materializes only the benchmarked files.
This is the long-term source the README already anticipated; the pinned
commit is now the fixtures' provenance (the manifest lives in the corpus
repo). Currently the temporary solx-corpus-preview branch — repoint `ref`
to the final solx-corpus/ on main once published.

Prep the via-IR pipeline as a first-class, opt-in dimension:

- run.sh gains a repeatable --variant (default solx-legacy-dwarf) that
  selects <scenario>/<variant>.json per scenario. The pipeline is encoded in
  the standard JSON, so no solx flag is needed. --fixtures is now required
  (the vendored default is gone) and an empty resolution fails loudly.
- The checkout fetches both the legacy and via-IR variants of the three
  scenarios (aave-v4 stays out — it needs EVM_DISABLE_MEMORY_SAFE_ASM_CHECK=1,
  which the validation pass rejects). via-IR is off by default; a new
  include_via_ir workflow_dispatch input turns it on.
- report.py drops the hardcoded "EVMLA pipeline" title, since via-IR sections
  can now appear (each section header already carries the variant).
@nebasuke
nebasuke force-pushed the compile-benchmark-corpus branch from 271de69 to ef7b8d3 Compare July 10, 2026 12:11
@github-actions

Copy link
Copy Markdown

Compile-time benchmark (--standard-json)

pr: solx v0.1.4, LLVM-based Solidity compiler for the EVM, Front end: solc, LLVM build: cec9acbdc2799e5607ea57c4f1617ca8579afbf9
main: solx v0.1.4, LLVM-based Solidity compiler for the EVM, Front end: solc, LLVM build: cec9acbdc2799e5607ea57c4f1617ca8579afbf9
release: solx v0.1.4, LLVM-based Solidity compiler for the EVM, Front end: solc, LLVM build: aaa40607301776680f66f4119b5f564a8416cca0

ens-verifiable-factory-solx--solx-legacy-dwarf

binary mean ± σ min … max vs baseline
pr 5.006 s ± 0.012 s 4.994 s … 5.017 s 1.001×
main 5.003 s ± 0.036 s 4.978 s … 5.044 s 1.000×
release 6.622 s ± 0.093 s 6.556 s … 6.729 s 1.324×

openzeppelin-contracts-0.34--solx-legacy-dwarf

binary mean ± σ min … max vs baseline
pr 51.716 s ± 0.101 s 51.634 s … 51.829 s 0.999×
main 51.775 s ± 0.138 s 51.673 s … 51.932 s 1.000×
release 246.753 s ± 4.883 s 243.754 s … 252.387 s 4.766×

uniswap-v4-core-solx--solx-legacy-dwarf

binary mean ± σ min … max vs baseline
pr 21.468 s ± 0.062 s 21.417 s … 21.537 s 1.000×
main 21.470 s ± 0.057 s 21.422 s … 21.534 s 1.000×
release 71.976 s ± 3.864 s 67.588 s … 74.871 s 3.352×

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

Labels

ci:compile-benchmark Run hyperfine compilation benchmark for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant