python / python/cpython

Add tier 2 partial evaluation pass.

未關閉
#120,619 4 則留言 0 個 reaction 已指派 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. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。