wide-midnight-78598
04/23/2026, 2:15 PMbash
cargo build --release
default -> 1m 35s
debug = "line-tables-only" -> 1m 43s
codegen-units = 1 -> in 2m 43s
lto = "thin" -> 3m 09s
lto = "fat" -> 4m 19s
Excluding the debug aspect, each of the additive changes that increased build time, also generated a reliable, but incremental performance improvement on both pants --version and pants --no-pantsd --version... On my random, uncontrolled Mac Mini M2 Pro in my entirely typical development setup.
Effectively, our startup time dropped very slightly. How this would look on other user's individual workloads... 🤷🏽 but in my experience with Pants, speeding up startup typically leads to same or slightly faster elsewhere speeds elsewhere as well.
We run into a question of whether the juice is worth the squeeze at some point, but if it's CI juice we're squeezing, then even those incremental improvements spread across thousands of runs * people adds up.
The thing I'm actually more interested in is whether we should have 3 profiles: dev (local runs), release (local runs), release-lto (runs in CI).wide-midnight-78598
04/23/2026, 2:18 PMMODE=debug now, but for cases like PANTS_SOURCE or other local workflows where I want to get a feel for speed of operation (or prohibitively slow things), does anyone think it's worth it to have the 3 profiles I listed?
A fully optimized CI one, then a default dev and default release for local usage?fast-school-44220
04/23/2026, 2:19 PMwide-midnight-78598
04/23/2026, 2:21 PMhappy-kitchen-89482
04/23/2026, 6:33 PMwide-midnight-78598
04/23/2026, 6:35 PMcurved-manchester-66006
04/24/2026, 2:21 AMperf toolkit works.
• The "default" should probably be something that makes sense for people working on src/python since that is the more common case.
Three profiles makes sense to me. I was also (from the PR) fine with two.
(My understanding is that "thin lto" is faster to do with a better result than "fat lto" and I'm curios if your results suggested otherwise.)wide-midnight-78598
04/24/2026, 2:31 AMMy understanding is that "thin lto" is faster to do with a better result than "fat lto" and I'm curios if your results suggested otherwiseFaster to build? Yeah. Better performance? I think that's a "it-depends", but there are cases where any LTO can slow one down (that's a bit of a degenerate case in my opinion). Overall, my experience with a bunch of projects has been that fat LTO runs faster than thin, but I can't claim that's a universal fact of life. When in doubt, I trust Nethercote (https://nnethercote.github.io/perf-book/build-configuration.html#link-time-optimization)
wide-midnight-78598
04/24/2026, 2:36 AM