release: thin LTO and one codegen unit for the compute-bound translator #141
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!141
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-141"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@mattkajorinc on GitHub · 2026-11-26 07:07 UTC · original
mattkajorinc:perf/release-lto→main· +6 −0 · 1 files · 1 commits · openNote: this workstation is Linux with no GPU and the repo only runs on Windows (D3D12), so nothing here was observed in a live run. The change is validated statically — cross-compiled for
x86_64-pc-windows-msvc(the CI target) andx86_64-pc-windows-gnu, clippy-clean in the changed files, fmt-clean against the repo'srustfmt.toml, plus the host-side unit tests of the Linux-buildable crates. An A/B protocol is given for your hardware where a measurement matters.The translator is compute-bound, and the release profile had no whole-program optimisation. This adds the standard maximum-performance release settings:
Thin LTO keeps build time close to the plain build's; a single codegen unit lets the final unit inline across the whole crate.
profile.diaginherits these.Validation: the profile is valid and
lto = "thin"+codegen-units = 1compiles and links end-to-end (verified with a--releasebuild of the Linux-buildable crates); every crate still type-checks forx86_64-pc-windows-msvc(the CI target). A fully linked Windows.exeneeds a Windows machine (this Linux workstation has neither the MSVClink.exenor mingw'sdlltool) — that is an environment limit, not a property of this change.I could not measure the effect here (Linux, no GPU; the repo runs on Windows only), so this is a standard optimisation to A/B on your hardware: build a release with and without these lines and time an identical
victory translateover the same input. If build time matters more than the last few percent,lto = "thin"alone is the conservative half.@avatarmanz on GitHub · 2026-11-26 07:33 UTC · original
Left open: thin LTO with one codegen unit also applies to the diag profile (it inherits release) and makes every build longer; no measurement yet. Maintainer's call.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.