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

Enable full LTO #1319

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Enable full LTO #1319

merged 1 commit into from
Jul 16, 2024

Conversation

rinon
Copy link
Collaborator

@rinon rinon commented Jul 15, 2024

No description provided.

Copy link
Collaborator

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

How much does this help perf? Does it put us in the negative vs. C as @lqd saw, or was that mostly from target-cpu=native?

@lqd
Copy link

lqd commented Jul 16, 2024

The overhead doesn’t change much. My results were mostly because of target-cpu + fat LTO + rebuilding std/alloc/core with them (but I wasn’t clear enough that I was mostly looking at rust codegen on x64-v1 vs v3, not at the C version — just to have some ideas of achievable limits. We also looked at PGO to see some theoretical limits, but that’s of course not applicable in practice here :)

@rinon
Copy link
Collaborator Author

rinon commented Jul 16, 2024

In my measurements this was a very small, if anything, speedup. I'll measure more carefully and post numbers.

@rinon
Copy link
Collaborator Author

rinon commented Jul 16, 2024

This is a 0.2% speedup on my Ryzen 7700X. It's consistent and slightly above measurement noise, with only a small increase in build time. I'm going to put this in.

@rinon rinon merged commit b80f922 into main Jul 16, 2024
27 checks passed
@rinon rinon deleted the sjc/rust_lto branch July 16, 2024 07: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.

3 participants