python: 3.14: build with clang, lld, ThinLTO and tail-call interpreter#365
Open
bdraco wants to merge 2 commits into
Open
python: 3.14: build with clang, lld, ThinLTO and tail-call interpreter#365bdraco wants to merge 2 commits into
bdraco wants to merge 2 commits into
Conversation
Switches the 3.14 image to clang with lld and ThinLTO, and enables the tail call interpreter; this matches what python build standalone ships with astral-sh/setup-uv and is roughly 10% faster than the current GCC build. Only 3.14 is touched; 3.12 and 3.13 stay on GCC since we only keep them for back compat.
PGO instrumentation links against libclang_rt.profile.a which ships in Alpine's compiler-rt package; add it to build-deps.
There was a problem hiding this comment.
Pull request overview
This PR updates the Python 3.14 image build to use an LLVM-based toolchain and newer CPython build/configure options aimed at improving runtime performance.
Changes:
- Add LLVM toolchain packages (clang/llvm/lld/compiler-rt) to the Python 3.14 build dependencies.
- Switch CPython build to ThinLTO (
--with-lto=thin) and enable the tail-call interpreter (--with-tail-call-interp). - Use clang as the compiler and lld as the linker for the build.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
While this works locally for me and obviously is widely deployed via uv, it should still get a nightly HA build before shipping just to be sure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've been meaning to do this for a while because I see all the profiles and uv's python is noticeably faster, but I keep forgeting, but today I finally had some cycles to do it.
Its nearly a 10% free speed up for most cases https://lwn.net/Articles/1010905/