xxHash icon indicating copy to clipboard operation
xxHash copied to clipboard

Benchmark Bandwidth Units

Open calgray opened this issue 6 months ago • 1 comments

It can be observed from lines such as: https://github.com/Cyan4973/xxHash/blob/38d555879fddae7300ece2c0820b3332c1d5748f/tests/bench/benchfn.c#L32 and: https://github.com/Cyan4973/xxHash/blob/38d555879fddae7300ece2c0820b3332c1d5748f/tests/bench/main.c#L69

that MB and MiB in benchmarks both mean 2^20 bytes instead of 10^6 bytes.

This in turn suggests that it's likely that documentation reported bandwidths in GB/s are instead really in GiB/s, and should be ~7% higher for metric GB/s (the bigger number is often why internet and storage companies use metric units).

calgray avatar Jun 27 '25 04:06 calgray

that MB and MiB in benchmarks both mean 2^20 bytes instead of 10^6 bytes.

Well, not the same. M means 'mega' ie. 10^6. Mi means 'mebi' ie. 2^20.

megabytes vs mebibytes

tansy avatar Jun 27 '25 20:06 tansy