Skip to content

Commit 995e70f

Browse files
committed
build: Add thin LTO to release builds
This commit enables "thin" link time optimization on release builds. Per my local testing, compile times are roughly equivalent to compile times with `lto=false`, but thin LTO improves performance by ~10% when it comes to proxying and a few selected benchmarks I ran. On my machine, a release build with thin LTO took about 6 minutes to complete, and a release build with fat LTO took about 20 minutes to complete. Fat LTO only exhibited about 1-2% better performance than thin LTO, so it doesn't seem worth the increased compile times. Release-Note-Core: Enabled thin link time optimization in release builds, generally improving performance by about 10% Change-Id: I4f0612ee5a53163d563131fb03a497bbdfd9f9ab Reviewed-on: https://gerrit.readyset.name/c/readyset/+/7216 Tested-by: Buildkite CI Reviewed-by: Jason Brown <jason.b@readyset.io>
1 parent aa7b4b2 commit 995e70f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ metrics-util = { git = "https://github.com/readysettech/metrics.git" }
8282

8383
[profile.release]
8484
debug=true
85+
lto="thin"
8586

8687
[profile.release-dist]
8788
# configs for distro release packages (i.e. deb, rpm, etc.)

0 commit comments

Comments
 (0)