python / python/cpython

Move Tier 2 interpreter out of `_PyEval_EvalFrameDefault`

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

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

interpreter-core
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

See discussion starting here: https://github.com/faster-cpython/ideas/issues/631#issuecomment-1995191531

Basically, we see no real perf improvement for having the two switches inside the same function, and we have some indication that on Windows the compiler is failing to optimize this giant function. In addition, the logic for each of the interpreters is somewhat complicated due to sharing variables and labels.

This is not as simple as reverting gh-111428 (issue gh-111520), but in the abstract, that's the proposal.

The priority isn't clear, but it's probably doing before the 3.13 feature freeze.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

リンクされている faster-cpython の議論から始め、次に _PyEval_EvalFrameDefault と、その周辺の Tier 2 interpreter のロジックを調査してください。2つのインタープリターが現在どのように変数とラベルを共有しているか、またそれらを分離するにはどの境界が必要かを明らかにしてください。完了条件は、インタープリターの動作を維持し、記載された最適化上の懸念に対処しながら、Tier 2 interpreter を外部へ移すことです。

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

評価

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

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

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