python / python/cpython

Add tier 2 partial evaluation pass.

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

@Fidget-Spinner がすでに取り組んでいます。

2024年9月1日 から。

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

説明

Once an optimization pass is in place, it enables external contributors to make improvements.
It happened with the tier 1 specializer and is happening now with the tier 2 optimizer and JIT.
We should add the partial evaluation pass, so that external contributors can help with that.

The aim of the partial evaluation pass is to do computation, allocation and deallocation during optimization, so it doesn't need to be done at runtime.

We should add this pass, starting with a few very simple optimizations as placeholders for the full pass to be added later.
These optimizations should include:

  • Float unboxing
  • Temporary tuple elimination

We can start with the very simple optimization : BUILD_TUPLE 2; _RETURN_VALUE; UNPACK 2 -> _RETURN_PAIR before adding more complex optimizations in the future.

Linked PRs
  • gh-120624
  • gh-123652
  • gh-124518
  • gh-124846
  • gh-124910
  • gh-126856

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

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

はじめの一歩

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

評価

この issue はまだ評価されていません。

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

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