Skip to content

feat: PGO#726

Draft
DaniPopes wants to merge 16 commits intomainfrom
dani/pgo
Draft

feat: PGO#726
DaniPopes wants to merge 16 commits intomainfrom
dani/pgo

Conversation

@DaniPopes
Copy link
Copy Markdown
Collaborator

@DaniPopes DaniPopes commented Jan 26, 2026

needs upstream support in cargo-dist

Comment thread .github/workflows/test-pgo-bolt.yml Fixed
Copy link
Copy Markdown
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

Nice - we should also give this another shot on Reth / tempo

Comment thread .github/workflows/test-pgo-bolt.yml Fixed
@DaniPopes DaniPopes force-pushed the dani/pgo branch 3 times, most recently from 5f12969 to bcfb5b2 Compare January 26, 2026 14:05
Add PGO (Profile-Guided Optimization) to cargo-dist release workflow:
- .github/scripts/build-pgo.sh: Uses cargo-pgo to build instrumented
  binary, gather profiles from testdata/*.sol, and set RUSTFLAGS
- .github/workflows/dist-build-setup.yml: Runs PGO script before dist
- .github/workflows/test-pgo-bolt.yml: Test workflow that builds
  baseline/PGO/PGO+BOLT binaries and benchmarks with hyperfine

The test workflow also includes BOLT optimization which provides
additional ~1% speedup on top of PGO's ~7% improvement. BOLT is not
yet integrated into the release workflow as it requires post-build
processing that cargo-dist doesn't support via hooks.

Benchmark results (GitHub Actions runner):
- Small files: PGO+BOLT is 8% faster than baseline
- Large files: PGO+BOLT is 8% faster than baseline

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019bf7a1-0015-74f4-a5f6-c71ce48b4663
Comment thread .github/workflows/test-pgo-bolt.yml Fixed
Comment thread .github/workflows/test-pgo-bolt.yml Fixed
DaniPopes and others added 4 commits January 26, 2026 16:12
- Run build-pgo-bolt.sh before dist build for x86_64-linux-gnu
- Replace binary in tarball with BOLT-optimized version after dist build
- Add allow-dirty = ["ci"] to preserve manual release.yml edits
- Re-add test-pgo-bolt.yml workflow

Amp-Thread-ID: https://ampcode.com/threads/T-019bfaad-39e4-7636-a853-0c3e7b08d2c9
Co-authored-by: Amp <amp@ampcode.com>
- Add build-binaries.yml reusable workflow for all targets
- Enable PGO+BOLT for x86_64-unknown-linux-gnu
- Use build-local-artifacts=false + local-artifacts-jobs
- cargo-dist now calls our workflow instead of its own build job
- No manual release.yml modifications needed

Amp-Thread-ID: https://ampcode.com/threads/T-019bfaad-39e4-7636-a853-0c3e7b08d2c9
Co-authored-by: Amp <amp@ampcode.com>
Comment thread .github/workflows/build-binaries.yml Fixed
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.

3 participants