8000 perf: ship full-LTO dist builds and gate their size (#796) by adityamukho · Pull Request #801 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

perf: ship full-LTO dist builds and gate their size (#796) - #801

Merged
adityamukho merged 3 commits into
v3from
perf/796-dist-lto
Oct 30, 2026
Merged

adityamukho merged 3 commits into
v3from
perf/796-dist-lto

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Part of #796 (v3.0.0).

Change

  • [profile.dist] no longer sets lto = "thin". It inherits release (full LTO, opt-level = "z", one codegen unit, panic = "abort", stripped symbols), so released binaries are built the way the size gate builds.
  • binary-size.yml builds --profile dist and measures target/dist/minigraf. The gate now checks the x86_64 Linux binary cargo-dist ships, and a later dist-only override would show up in it. The cap stays 1,263,616 bytes.
  • PHILOSOPHY.md §4 states what the gate measures; CHANGELOG entry.
  • release.yml is unchanged (it is cargo-dist generated).

Measurements

Done on rustc 1.99.1, on the five cargo-dist runners (temporary branch run 41012917889, since deleted) and on the bench machine. Details and every round are in docs/benchmarks/796-dist-lto.md and docs/benchmarks/796-dist-lto/. Measured before #794 merged.

Target Thin → full LTO Saved
x86_64 Linux (gated) 1,501,232 → 1,262,584 15.9%
aarch64 Linux 1,262,544 → 1,094,504 13.3%
x86_64 macOS 1,503,392 → 1,075,840 28.4%
aarch64 macOS 1,372,560 → 954,192 30.5%
x86_64 Windows, packaged (static CRT) 1,139,712 → 1,060,864 6.9%
  • Gate headroom: none. The full-LTO dist binary equals the --release binary the gate already measured (byte-identical locally).
  • Runtime: full LTO is 4–17% faster on the three query workloads on every target, and faster in 20/20 bench rounds. The file-ingest workload is within noise on macOS.
  • Build time: full LTO adds 0–10 s per clean build (3 s on the bench machine).
  • Packaging: dist build --artifacts=local packages every target. Each packaged binary has the full-LTO size and runs the demo. Windows packages use cargo-dist's +crt-static; a static-CRT build reproduces the packaged size (run 41014187879).

Not changed: API, file format, MSRV, size cap, coverage floors. Source-level size work (#797) is still needed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01H2a7Qo5yfvBEjzSuUoB2n9

adityamukho and others added 3 commits October 30, 2026 12:02
`profile.dist` no longer overrides release's full LTO with thin LTO, and
binary-size.yml builds `--profile dist`, so the gate measures the binary
cargo-dist ships. The x86_64 Linux binary is unchanged (it equals the
release build); the shipped one shrinks from 1,501,232 to 1,262,584 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2a7Qo5yfvBEjzSuUoB2n9
Sizes, clean build times, CLI runtime and cargo-dist packaging on the five
release runners and the bench machine; record that the size gate measures
the shipped x86_64 Linux dist binary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2a7Qo5yfvBEjzSuUoB2n9
@codecov
codecov Bot commented Oct 30, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adityamukho
adityamukho merged commit 29dd588 into v3 Oct 30, 2026
24 checks passed
@adityamukho
adityamukho deleted the perf/796-dist-lto branch October 30, 2026 07:58
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

0