Skip to content

Commit 468b232

Browse files
committed
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.
1 parent eed99cf commit 468b232

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/bench/crypto_hash.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@ static void MuHashDiv(benchmark::Bench& bench)
134134
FastRandomContext rng(true);
135135
MuHash3072 muhash{rng.randbytes(32)};
136136

137-
for (size_t i = 0; i < bench.epochIterations(); ++i) {
138-
acc *= muhash;
139-
}
140-
141137
bench.run([&] {
142138
acc /= muhash;
143139
});

0 commit comments

Comments
 (0)