python / python/pyperformance

unpack_sequence benchmark too fast on modern computers

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

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

主要言語
Python
スター
1k
フォーク
203
平均マージ
1時間 20分
マージ済み PR(30日)
2

説明

On modern computers, unpack_sequence completes in nanoseconds (!!!).

This is basically within the range of noise for modern computers. The cause is that for some reason, the inner loops are hardcoded instead of letting pyperf decide

https://github.com/python/pyperformance/blob/main/pyperformance/data-files/benchmarks/bm_unpack_sequence/run_benchmark.py#L457

The fix is simple: just remove the inner_loops argument. However, fixing this would need a major version bump, as all past unpack sequence results would be invalidated.

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

pyperformance/data-files/benchmarks/bm_unpack_sequence/run_benchmark.py の 457 行目付近を開き、ハードコードされた inner_loops 引数を確認します。その引数を削除して pyperf がループ回数を選択できるようにし、その後 unpack_sequence ベンチマークの実行時間を検証するとともに、以前の結果が無効になるため必要な major バージョンの引き上げを考慮します。

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

評価

技術スタック
python
領域
performance, tooling
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

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

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