diff options
author | Martin Ankerl <martin.ankerl@gmail.com> | 2021-09-17 13:38:11 +0200 |
---|---|---|
committer | Martin Ankerl <martin.ankerl@gmail.com> | 2021-09-21 11:46:01 +0200 |
commit | 468b232f71562280aae16876bc257ec24f5fcccb (patch) | |
tree | 366e60293649df4fc57980acdf0d6e1b18800e41 /src/bench/crypto_hash.cpp | |
parent | eed99cf272426e5957bee35dc8e7d0798aec8ec0 (diff) |
bench: remove unnecessary & incorrect multiplication in MuHashDiv
Introduced in #19055, MuHashDiv benchmark used to multiply with a loop
based on epochIterations. That does not do what it is supposed to do,
because epochIterations() is determined automatically from nanobench.
Also, multiplication is not needed for the algorithm (as pointed out by
a comment in #19055), so it's better to remove this loop.
Diffstat (limited to 'src/bench/crypto_hash.cpp')
-rw-r--r-- | src/bench/crypto_hash.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/bench/crypto_hash.cpp b/src/bench/crypto_hash.cpp index 30fe11be6b..7d5e3ca4ee 100644 --- a/src/bench/crypto_hash.cpp +++ b/src/bench/crypto_hash.cpp @@ -134,10 +134,6 @@ static void MuHashDiv(benchmark::Bench& bench) FastRandomContext rng(true); MuHash3072 muhash{rng.randbytes(32)}; - for (size_t i = 0; i < bench.epochIterations(); ++i) { - acc *= muhash; - } - bench.run([&] { acc /= muhash; }); |