python / python/cpython

Limit size of generated machine code to allow more efficient branching.

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

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

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

説明

Most architectures have smaller and more efficient ways of branching to "near" locations than "far" locations.

In x86-64 a branch to a location within 2GB is smaller than to an arbitrary 64 bit location.
Likewise, in AArch64, a branch to within 1MB is a single instruction, but further branches will take more instructions.

We should limit the size of traces such that we can use more efficient branches in the generated machine code.

This will have little or no impact, as traces in release builds are unlikely to ever reach this limit, but we will to need enforce it for correctness, especially in debug builds.

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

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

はじめの一歩

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

調査の方向性

ファイルもテストも指定されていません。まず、x86-64 と AArch64 のトレース生成およびアーキテクチャ固有の分岐出力を探し、次にトレースサイズの上限をどこで適用できるかを特定してください。完了の条件は、デバッグビルドを含め、生成されたトレースが意図された分岐範囲内に収まり、通常のリリース動作に影響を与えないことです。

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

評価

技術スタック
python
領域
compilers, performance
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

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

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