ITADN

fix sha256 napkin math numbers

#32Pull Requestthundergolfer 创建于 2024-09-03
T
thundergolfercommented
The sha256 performance numbers are too low. 1GiB/s throughput and ~100ns latency on 64b is achievable with just a bump in the package version, at least on my box :) The benchmark uses 64b as its per-iteration chunk size, and this underestimates throughput (559MiB/s). At larger chunk sizes 1-1.5 GiB/s is achievable. ``` Matching tests with regex: hash_sha256 Executing hash_sha256.. [Sha256 <64 B>] Iterations in 5017 miliseconds, no overhead: 46,018,765 [Sha256 <64 B>] Iterations / second: 9,172,566 [Sha256 <64 B>] Bytes handled per iteration: 64 bytes [Sha256 <64 B>] Total bytes processed: 2.743 GiB [Sha256 <64 B>] Throughput: 559.849 MiB/s [Sha256 <64 B>] Avg single iteration: 109 ns [Sha256 <64 B>] Avg single iteration cycles: 0.00 [Sha256 <64 B>] Time to process 1 MiB: 1786 μs [Sha256 <64 B>] Time to process 1 GiB: 1829 ms [Sha256 <64 B>] Time to process 1 TiB: 31.22 min ``` I ran this on `m6i.12xlarge` running Ubuntu 20.04, but I generally find that 1GiB/s is the most accurate 'round number' for how fast sha256 is across our worker fleert.
合并状态:未合并 1 条评论