Cache Rust builds and remove ineffective thin LTO - #206
Merged
Conversation
This was referenced Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The cache deliberately leaves the simpleaf crate itself uncached. Rust-cache keys dependency artifacts by runner, toolchain, Cargo manifests/lockfile, and compiler environment. Release caching is declared through cache-builds in dist-workspace.toml, rather than as a hand edit to generated CI.
LTO measurement
Controlled clean-target release builds used the same checkout, host, Rust toolchain, and 16-way build:
Disabling thin LTO reduced wall time by 6.2% and peak compiler RSS by 12.1%. The distributable-size proxy was 1.2% smaller without LTO.
Five alternating 1,000-process batches showed no measurable runtime change: median quant-help time was 1.84 s for both binaries, and median chemistry-registry load/lookup time was 1.80 s for both. Because simpleaf delegates mapping, collation, quantification, and index construction to child programs, there is no demonstrated end-user runtime benefit to pay for thin LTO here.
CI cache measurement
An identical rerun of the final commit, after its cache-seeding run completed, produced:
Both warm jobs ran the full workflow, including release build/tests, strict rustdoc on Linux, conda environment setup, the released alevin-fry artifact, and the toy end-to-end pipeline. The cache archives were 858 MB on Linux and 516 MB on macOS.
Validation