Parallel diff and cmp on binary files?
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- rust
- 領域
- cli, performance
調査の方向性
ソースファイル、テスト、または具体的なエントリーポイントは指定されていません。まず、diff と cmp のバイナリ比較パスを特定し、報告されている b3sum のタイミングと比較して現在の挙動を測定してください。実装の前に、並列化をバイナリファイル、ディレクトリ比較、またはその両方に適用するのかを定義し、変更が完了したことを示すベンチマークとテストを決めてください。
索引モデルが issue の本文から書いたものです。
説明
I just had a revelation:
$ time b3sum dreamshaper_8\ \(1\).safetensors dreamshaper_8.safetensors
771c807db56dbfc33feda5638d920f6c507db971da44772ee44a08dc38c3b437 dreamshaper_8 (1).safetensors
771c807db56dbfc33feda5638d920f6c507db971da44772ee44a08dc38c3b437 dreamshaper_8.safetensors
real 0m0.172s
user 0m2.193s
sys 0m0.423s
$ time cmp dreamshaper_8\ \(1\).safetensors dreamshaper_8.safetensors
real 0m0.596s
user 0m0.183s
sys 0m0.411s
$ time diff dreamshaper_8\ \(1\).safetensors dreamshaper_8.safetensors
real 0m0.509s
user 0m0.079s
sys 0m0.428s
As you can see, even though the b3sum method has an additional cost (calculating a hash) it is way faster overall since it's leveraging parallelism.
Wouldn't it be a good improvement to bring parallelism to some of the tools like diff and cmp?
Maybe with a new (not-standardized) option?
Maybe by default because why not?
I guess diff has a special code path once it is sure that it's just a binary file, right? So in that code path it wouldn't be much of a problem to parallelize it.
This whole topic can even be pushed further when comparing directories... parallel diffing of files.
Come on it's 2025! :)
- 主要言語
- Rust
- スター
- 276
- フォーク
- 39
- 平均マージ
- 3時間 27分
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
uutils/diffutils のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
uutils/diffutils の issue をすべて見る
似ている issue
-
risk:low runtime status:in-progress type:test
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
EricSpencer00/Resilient#4835 · コメント 1 件 ·
-
agent:ready documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cesarferreira/stax#890 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100