diff --git a/src/bench/crypto_hash.cpp b/src/bench/crypto_hash.cpp index a0799aea7ad..2f1ff564388 100644 --- a/src/bench/crypto_hash.cpp +++ b/src/bench/crypto_hash.cpp @@ -249,6 +249,19 @@ static void MuHashPrecompute(benchmark::Bench& bench) }); } +static void MuHashFinalize(benchmark::Bench& bench) +{ + FastRandomContext rng(true); + MuHash3072 acc{rng.randbytes(32)}; + acc /= MuHash3072{rng.rand256()}; + + bench.run([&] { + uint256 out; + acc.Finalize(out); + acc /= MuHash3072{out}; + }); +} + BENCHMARK(BenchRIPEMD160, benchmark::PriorityLevel::HIGH); BENCHMARK(SHA1, benchmark::PriorityLevel::HIGH); BENCHMARK(SHA256_STANDARD, benchmark::PriorityLevel::HIGH); @@ -272,3 +285,4 @@ BENCHMARK(MuHash, benchmark::PriorityLevel::HIGH); BENCHMARK(MuHashMul, benchmark::PriorityLevel::HIGH); BENCHMARK(MuHashDiv, benchmark::PriorityLevel::HIGH); BENCHMARK(MuHashPrecompute, benchmark::PriorityLevel::HIGH); +BENCHMARK(MuHashFinalize, benchmark::PriorityLevel::HIGH);