GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reduce perf trampoline overhead · Issue #161676 · python/cpython

Reduce perf trampoline overhead #161676

New issue
Copy link
New issue
Copy link
Open
Open
Reduce perf trampoline overhead#161676
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement

Description

@pablogsal
pablogsal
opened on Nov 9, 2026
Issue body actions

-X perf makes Python code much slower. The perf trampoline is a PEP 523 hook, so specialized calls and generator resumes are disabled while it is active, and the trampoline evaluator keeps an extra native frame alive on every call.

Slowdown with -X perf on main (PGO + ThinLTO, Clang 21):

Benchmark Slowdown
generators +234%
generator_resumes +72%
python_calls +50%
scimark_lu +42%
pyperformance (geometric mean) +12%

Linked PRs

  • gh-161676: Reduce perf trampoline overhead #161677

Activity

  1. aisk
    added
    type-featureA feature request or enhancementA feature request or enhancement
    performancePerformance or resource usagePerformance or resource usage
    on Nov 9, 2026
  2. pablogsal
    added a commit that references this issue on Nov 9, 2026

    pythongh-161676: Fix perf trampoline offset signedness and news path

    5afac8d
  3. picnixz
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Nov 9, 2026
  4. pablogsal
    added 2 commits that reference this issue on Nov 9, 2026

    pythongh-161676: Let the perf trampoline evaluator tail-call the tram…

    bd91c37

    pythongh-161676: Keep specialized calls enabled under the perf trampo…

    88c2e1b
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

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.