Help us benchmark incremental compilation!

These numbers are for Alacritty with release.lto = true. Numbers are generated with lto enabled since the project has this enabled by default.

  1. 763.81s user 13.75s system (Fresh build)
  2. 776.68s user 18.35s system (Clean build)
  3. (CARGO_INCREMENTAL=1 and clean target)

Oops, apparently this doesn’t work with LTO.

error: can't perform LTO when compiling incrementally

Starting over without LTO flag, but this basically means incremental won’t be usable by default for Alacritty.

  1. 626.46s user 17.02s system (Fresh build)
  2. 630.91s user 18.37s system (Clean build)
  3. 589.52s user 19.27s system (CARGO_INCREMENTAL=1 and clean target)
  4. 12.40s user 2.18s system (CARGO_INCREMENTAL=1 and touch src/main.rs)
  5. 55.97s user 1.88s system (CARGO_INCREMENTAL=1 and noop change in fn main())

Regarding the LTO issue, it would be nice if this either worked with incremental compilation, or if there could be an additional build profile. For Alacritty, the use cases would be

  • Release: LTO, optimizations
  • Dev: Want optimizations, incremental build
  • Debug: No optimizations; helpful for viewing complete call stacks when digging into perf issues.
1 Like