Restore (or beat) Python 2 performance for arithmetic operations on ints that fit into a single word

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

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

評価

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

調査の方向性

faster-cpython/ideas#548 のより詳しい議論から始め、続いてリンクされている pull request gh-101292、gh-101685、gh-102464、gh-104742、gh-104759、gh-107388、gh-107392、gh-125384、gh-125407、gh-125408 を確認してください。単一ワード整数の算術演算について、Python 2 の性能を回復または上回る新しい int/long オブジェクトレイアウトが実現すれば完了です。

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

説明

interpreter-core performance

In Python 2 ints and longs were different objects, and the design of each was tailored to the different size and use cases.
In Python3 we dropped the distinction, but we also dropped the design for ints that fit into a single word.
We have added various fast paths for "medium" integers (e.g. https://github.com/python/cpython/issues/89109) but the underlying data structure gets in the way.

We should layout the int/long object so that it supports fast operations for most integers.

See https://github.com/faster-cpython/ideas/issues/548 for a fuller discussion

Linked PRs
  • gh-101292
  • gh-101685
  • gh-102464
  • gh-104742
  • gh-104759
  • gh-107388
  • gh-107392
  • gh-125384
  • gh-125407
  • gh-125408
主要言語
Python
スター
77.2k
フォーク
36k
平均マージ
1日 9時間
マージ済み PR(30日)
558

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

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

はじめの一歩

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

python/cpython のほかの issue

python/cpython の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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