Skip to content

[3.14] Enable the tail calling interpreter #1054

Description

@jack-mcivor

Can the 3.14 images enable the tail call interpreter? IIUC this brings a 5-6% free performance improvement
https://docs.python.org/3.14/using/configure.html#cmdoption-with-tail-call-interp

Activity

  1. tianon commented on Jun 18, 2025

    @tianon
    Member

    Our builds don't currently happen with Clang, and this doesn't appear to be supported with GCC (certainly not with the version we're building against).

    For JIT (#1043, #947), we need Clang, but I'm not sure what the future of that is or whether that actually uses Clang for the entire build or just for the JIT functionality.

    So before we can really consider this, we need to figure out how much work it'd be to switch to Clang, and what the downsides are.

    Diff I was testing with:
    diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template
    index 8b3b8c8..1851ee6 100644
    --- a/Dockerfile-linux.template
    +++ b/Dockerfile-linux.template
    @@ -175,6 +175,9 @@ RUN set -eux; \
            if is_alpine then "" else (
     -}}
                    --enable-optimizations \
    +{{ if rcVersion | IN("3.9", "3.10", "3.11", "3.12", "3.13") then "" else ( -}}
    +               --with-tail-call-interp \
    +{{ ) end -}}
     {{ ) end -}}
                    --enable-option-checking=fatal \
                    --enable-shared \
  2. changed the title [-][3.14] Enable tail call optimization[/-] [+][3.14] Enable the tail calling interpreter[/+] on Jun 18, 2025
  3. erlenekalafo commented on Aug 4, 2026

    @erlenekalafo
  4. UfBt12qJNZKcw commented on Aug 9, 2026

    @UfBt12qJNZKcw
  5. Ix3WUhpgTPE commented on Aug 16, 2026

    @Ix3WUhpgTPE
  6. locked as spam and limited conversation to collaborators on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions