Throughput benchmark results are favoring gxhash for most input sizes and platforms, however the results are off when comparing with a criterion.rs throughput benchmark for small input size. A suspicion is that the byte code is so small that it is entirely inlined and part of it is optimized away in the benchmark, producing biais.
Todo
Use std::hint::black_box on every iteration around the input data (not necessarily the seed, it's great if this part can be optimized)
Use std::hint::black_box around the benchmarked function itself to prevent it to be optimized away and to prevent benchmark loop to be unrolled.
"Cut" the stack by forcing the benchmark loop to not be inlined (keeping the measurements bits away) so that we have the most unitary piece.
Context
Throughput benchmark results are favoring gxhash for most input sizes and platforms, however the results are off when comparing with a criterion.rs throughput benchmark for small input size. A suspicion is that the byte code is so small that it is entirely inlined and part of it is optimized away in the benchmark, producing biais.
Todo
std::hint::black_box
on every iteration around the input data (not necessarily the seed, it's great if this part can be optimized)std::hint::black_box
around the benchmarked function itself to prevent it to be optimized away and to prevent benchmark loop to be unrolled.