-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Investigate lto & codegen units #785
Comments
I just tried commenting out these two lines from
|
For what it's worth, looking back at the original post on the forum, this addition was proposed as a way of reducing binary size (rather than increasing performance), which still appears to hold true. |
Yep, I don't think many people are actually building the release version locally except for me. Maybe a better way would be to inject it only on CI? So users still get the small binary but don't suffer any penalties locally. |
I had a similar thought, since it seems like the best of both worlds, but the concern with only having the release optimizations on CI is that it might lead to unoptimized binaries in other places. For example, I remember that @ignatenkobrain maintains Zola on Fedora and it may be compiled from source in that context (rather than just downloading a binary from GitHub), so they would end up with an unoptimized release binary with the aforementioned setup. Anyone who maintains a separate build of Zola like this would have to know to add these optimizations to reduce the binary size (even if it was just uncommenting these lines in Cargo.toml). I feel like it's better to have the release optimizations by default and anyone who needs faster release compilation locally can comment out the |
Well, yes and no. We do pass codegen-units=1 in our RUSTFLAGS. But we don't have -C lto now. I am not sure why we haven't enabled it yet. |
Compelling argument @samford |
Right now the Cargo.toml has:
in it for better performance at the cost of compilation speed.
Investigate how much additional time it takes & the perf difference.
This should be ideally done after #782
The text was updated successfully, but these errors were encountered: