python / python/cpython

Performance regression with cyclic GC vs 3.13

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

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

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

説明

Bug report

Bug description:

While working on the free-threaded GC, I noticed this performance regression with the default build GC. Running the attached script (bm_gc_collect.py) with the main branch of Python shows much worse performance vs 3.13. I get 20.8 seconds for the main branch and 3.3 seconds for 3.13. Adding gc.disable() before calling benchmark_collection() seems to fix it.

bm_gc_collect.py.txt

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs
  • gh-132488

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

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

はじめの一歩

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

調査の方向性

まず、添付された bm_gc_collect.py スクリプトを Linux 上の CPython main と Python 3.13 で実行し、gc.disable() の有無による報告されたコレクション時間を比較します。リンクされている PR gh-132488 と、それが扱う free-threaded GC の変更を読みます。3.13 と比べてベンチマークが大幅に遅くならないよう回帰が解消されれば完了です。

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

評価

技術スタック
python
領域
performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

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

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