blake2 simd benches produce unexpected results
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust
調査の方向性
まず、デフォルト構成と simd 構成について示されている 2 つの cargo +nightly bench コマンドを実行し、次に Blake2 ベンチマークのエントリポイントとスループットの計算方法を調べます。報告される MB/s の値が測定されたベンチマーク時間を正確に反映し、2 つの構成間で一貫していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I ran blake2 tests with and without simd feature enabled and found that behavior is strange and doesn't make a lot of sense.
Default (no simd):
$ cargo +nightly bench
...
running 8 tests
test blake2b512_10 ... bench: 8 ns/iter (+/- 0) = 1250 MB/s
test blake2b512_100 ... bench: 74 ns/iter (+/- 4) = 1351 MB/s
test blake2b512_1000 ... bench: 708 ns/iter (+/- 85) = 1412 MB/s
test blake2b512_10000 ... bench: 7,005 ns/iter (+/- 531) = 1427 MB/s
test blake2s256_10 ... bench: 13 ns/iter (+/- 0) = 769 MB/s
test blake2s256_100 ... bench: 121 ns/iter (+/- 7) = 826 MB/s
test blake2s256_1000 ... bench: 1,155 ns/iter (+/- 62) = 865 MB/s
test blake2s256_10000 ... bench: 11,791 ns/iter (+/- 1,005) = 848 MB/s
test result: ok. 0 passed; 0 failed; 0 ignored; 8 measured; 0 filtered out; finished in 28.22s
Simd:
$ cargo +nightly bench --features simd
...
running 8 tests
test blake2b512_10 ... bench: 11 ns/iter (+/- 0) = 909 MB/s
test blake2b512_100 ... bench: 102 ns/iter (+/- 0) = 980 MB/s
test blake2b512_1000 ... bench: 1,010 ns/iter (+/- 11) = 990 MB/s
test blake2b512_10000 ... bench: 10,076 ns/iter (+/- 68) = 992 MB/s
test blake2s256_10 ... bench: 16 ns/iter (+/- 0) = 625 MB/s
test blake2s256_100 ... bench: 152 ns/iter (+/- 1) = 657 MB/s
test blake2s256_1000 ... bench: 1,483 ns/iter (+/- 12) = 674 MB/s
test blake2s256_10000 ... bench: 14,750 ns/iter (+/- 344) = 677 MB/s
test result: ok. 0 passed; 0 failed; 0 ignored; 8 measured; 0 filtered out; finished in 2.43s
I expected simd version to produce better results and judging by the total execution time it is the case, but throughput reported by the benchmark says the opposite.
I suspect something is wrong with benchmarking code.
Using latest master (cc523733e5ba84b5a366825a7d1150bbbfea368b right now) and rustc 1.65.0-nightly (20ffea693 2022-08-11).
- 主要言語
- Rust
- スター
- 2.3k
- フォーク
- 341
- 平均マージ
- 12時間 31分
- マージ済み PR(30日)
- 2
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RustCrypto/hashes のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
RustCrypto/hashes#912 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
RustCrypto/hashes#909 · コメント 4 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
RustCrypto/hashes#908 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
RustCrypto/hashes#763 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
RustCrypto/hashes#747 · コメント 1 件 ·
RustCrypto/hashes の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
bug core
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW オープンfuzz
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ClickHouse/ClickHouse#122114 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
linebender/vello_svg#90 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100