build: thin LTO and one codegen unit for the release profile (1.5-2x on the submission path) #96
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!96
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/96/head"
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?
@Key-rs on GitHub · 2026-11-25 14:01 UTC · original
Key-rs:perf/lto→main· +4 −0 · 1 files · 1 commits · merged 2026-11-25 17:09 UTCWhat
Two lines in
[profile.release]:No code changes, no behaviour change, no new dependency.
[profile.diag]inherits it, so the diagnostics build gets it too.Why
The port's own code is on the critical path every frame: the log of a heavy world frame on my machine reads
— i.e. ~355 ms of host-side submission per frame, the same order as the frame itself. Cross-crate inlining across
victory-*help exactly there: the submission path walks descriptors, hashes ranges and patches bindings through several crates.Measured
One machine: Ryzen 7 8845H (Zen 4), RTX 4060 Laptop 8 GB, Windows 11 26300. Belobug at
71652a2, same data, same switches (VICTORY_HAIR=1, the eightVICTORY_SKIP_PIPELINESfrom the README), same scripted input, world frames only:Roughly 1.5–2× on the CPU-side path, which is what took it from 1 fps to 2–3 fps in the world here. Build time goes from 1m05s to 1m41s.
There is also a local-only extra I did not put in the tree, because it is not portable:
On a Zen 4 host that is part of the numbers above; on any other CPU it is whatever
nativemeans there. Worth mentioning in the README next to the other build switches rather than committing.Notes
Cargo.tomlchanges;cargo xtask policyand the test suite are untouched by a profile setting.lto = "fat"is the same idea taken further and I can measure that instead; and if you want the default build kept as it is, this could live behind an opt-in profile (say[profile.release-lto]) — say which shape you prefer.