Benchmarks for common python I/O patterns
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 1k
- フォーク
- 203
- 平均マージ
- 1時間 20分
- マージ済み PR(30日)
- 2
説明
As work happens on I/O pieces I've been building specialized micro-benchmarks (ex. gh-120754 Speed up open().read() pattern by reducing the number of system calls and others have gh-117151: IO performance improvement, increase io.DEFAULT_BUFFER_SIZE to 128k), it would be nice to have more general benchmarks to validate I/O performance for common cases.
Talking a little with people at PyConUS there was some interest in the tests, and a general desire for I/O tests not to be enabled by default, but to be a group which can be manually run.
General I/O shapes I'm hoping to add benchmarks for:
- read/write all of the byes of a file in a single call (including pathlib.Path.read_text, pathlib.Path.write_text)
- read/write many small files (ex.
.pycfiles, maybe justcompile_all?) - streaming bytes read/write (ex. to a pipe / console such as stdin/stdout/stderr, non-seekable devices)
- read/write a zipfile, tarfile (read + seek, write + seek, in particular buffering behavior)
- use
zipimport - Create a
zipapp - Multi-threaded write to stdout, stderr (ex. logging in a large application/codebase)
Note: With these aiming to stay at the Binary / Bytes IO layer as much as possible (not touch Text I/O for now)
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
既存の pyperformance ベンチマークの構成と、この issue で提案されている I/O の形を確認し、対象範囲を Binary/Bytes IO レイヤーに限定します。選択した一般的なケースをカバーする手動実行可能なグループを定義し、デフォルトでは有効になっていないこと、およびベンチマークが意図したファイル、ストリーム、アーカイブ、インポート、または並行性のパターンを実行することを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- performance
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100