-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
Revert to default fullLTO on Clang #130048
Comments
Heh, this was on my backlog of issues to open. I fully support this... to me, |
Okay, but when the people can be ready to change if we want to change the policy? Why not propose to people to use lto=full if they want? (Yeah It's grumpy comment but I just ask) |
Or criteria will be any platform(at least tier1)should not be slow down if we want to change the default build policy? |
I think the problem is that people assume lto means lto full, and they forget that it's lto thin now on clang.
Yeah that seems reasonable. |
For the record, @zanieb tested this on Clang 19.1 (not apple Clang), and couldn't reproduce the slowdowns seen on macOS. So I suspect the latest clang versions have fixed this bug astral-sh/python-build-standalone#529 |
…thonGH-130049)" This reverts commit 34c06cc.
I deem it too disruptive to change a configure option twice and flip flop between the defaults just based on what compiler is available. I am thus reverting the change. Sorry! |
Wait, why was this reverted? Full LTO should always be the fastest option, right? |
http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html "In a few cases ThinLTO even outperforms full LTO, most likely because the higher scalability of ThinLTO allows using a more aggressive backend optimization pipeline (similar to that of a non-LTO build)." So not that always truth. It’s where to bet, but I believe that compiler people make parallel LTO performance be better for the performance stuff too. Basically it’s about the execution mechanism not about the optimization policy. |
My benchmarks, though not rigorous, showed full LTO to be a little slower astral-sh/python-build-standalone#529 (comment) 🤷♀ I could do more benchmarks if people want? Or explore the difference here instead of downstream in |
Feature or enhancement
Proposal:
Python 3.12 changed the default for Clang to ThinLTO. However, many people were unaware of this change and did not update their build scripts. This leaves a lot of perf on the table for macOS and possibly some other platforms.
This seems to be confusing and tripping up a lot of people. I propose we change the
--with-lto
default back to full.cc @brandtbucher @corona10
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: