Reduce perf trampoline overhead

オープン
#161,676 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
performance

調査の方向性

Start by reading the linked PR gh-161677, which may show where work has moved. The issue identifies the -X perf PEP 523 trampoline and reports slowdowns across generators, calls, and pyperformance, but names no files or tests. Compare the implementation and benchmark results there; done means reducing the reported overhead.

索引モデルが issue の本文から書いたものです。

説明

interpreter-core performance type-feature

-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-161677
主要言語
Python
スター
78.2k
フォーク
36.6k
平均マージ
19時間 57分
マージ済み PR(30日)
630

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

python/cpython のほかの issue

python/cpython の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。