Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off LTO for dev and test builds. #28397

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Turn off LTO for dev and test builds. #28397

merged 1 commit into from
Oct 15, 2024

Conversation

mikebenfield
Copy link
Collaborator

This results in a penalty to full compilation time, but a dramatic speedup to partial recompilation time.

This results in a penalty to full compilation time,
but a dramatic speedup to partial recompilation time.
@mikebenfield mikebenfield requested a review from d0cd October 13, 2024 00:03
@mikebenfield
Copy link
Collaborator Author

On my system, on this branch:

% cargo clean
...
% cargo build --profile dev
...
    Finished `dev` profile [optimized + debuginfo] target(s) in 7m 52s

% touch compiler/parser/src/lib.rs
% cargo build --profile dev
...
    Finished `dev` profile [optimized + debuginfo] target(s) in 6.84s

% touch compiler/passes/src/lib.rs
% cargo build --profile dev
...
    Finished `dev` profile [optimized + debuginfo] target(s) in 5.76s

That is, a full compile takes about 8 minutes, and a partial recompile takes about 6 seconds.

On the mainnet branch, those times are 6 minutes and 4 minutes.

Copy link
Collaborator

@d0cd d0cd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@d0cd d0cd merged commit 75a0277 into mainnet Oct 15, 2024
13 checks passed
@d0cd d0cd deleted the lto-off branch October 15, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants