Skip to content

Commit e9707f1

Browse files
committed
Change default build parameters improving incremental release build times by ~70% w/o a measurable degradation in runtime performance #46.
1 parent 96afbd8 commit e9707f1

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Cargo.toml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,17 @@ exclude = [
3030
[profile.release]
3131
panic = "unwind"
3232
opt-level = 3
33-
# PGO doesn't work with LTO: https://github.com/llvm/llvm-project/issues/57501
34-
# lto = "off"
35-
lto = true
36-
codegen-units = 1
33+
# LTO is fun. A few observations:
34+
# * PGO doesn't work with LTO: https://github.com/llvm/llvm-project/issues/57501
35+
# * Cranelift doesn't work with LTO: missing symbols during linking.
36+
# * Setting `lto` to true or "fat" has a significant impact on build times
37+
# manifesting as `LLVM_passes` and `finish_ongoing_codegen` in the build
38+
# timings. Also increasing the `codegen-units` doesn't seem to have an effect
39+
# in "fat"-mode.
40+
# * In TB benchmarks "fat" did not perform better than "thin" LTO.
41+
lto = "thin" # ("off", "thin", "fat")
42+
codegen-units = 16
43+
strip = "debuginfo"
3744

3845
# Workaround for https://github.com/gwenn/lemon-rs/issues/78. sqlite3-parser
3946
# requires 1+MB stack frames to parse trivial SQL statements, which is larger

0 commit comments

Comments
 (0)