Add benchmark for MuHash finalization
This commit is contained in:
1 parent
66aa6a47bd
commit
91ce8cef2d
1 file changed
+14
@@ -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(BenchRIPEMD160, benchmark::PriorityLevel::HIGH);
|
||||||
BENCHMARK(SHA1, benchmark::PriorityLevel::HIGH);
|
BENCHMARK(SHA1, benchmark::PriorityLevel::HIGH);
|
||||||
BENCHMARK(SHA256_STANDARD, benchmark::PriorityLevel::HIGH);
|
BENCHMARK(SHA256_STANDARD, benchmark::PriorityLevel::HIGH);
|
||||||
@@ -272,3 +285,4 @@ BENCHMARK(MuHash, benchmark::PriorityLevel::HIGH);
|
|||||||
BENCHMARK(MuHashMul, benchmark::PriorityLevel::HIGH);
|
BENCHMARK(MuHashMul, benchmark::PriorityLevel::HIGH);
|
||||||
BENCHMARK(MuHashDiv, benchmark::PriorityLevel::HIGH);
|
BENCHMARK(MuHashDiv, benchmark::PriorityLevel::HIGH);
|
||||||
BENCHMARK(MuHashPrecompute, benchmark::PriorityLevel::HIGH);
|
BENCHMARK(MuHashPrecompute, benchmark::PriorityLevel::HIGH);
|
||||||
|
BENCHMARK(MuHashFinalize, benchmark::PriorityLevel::HIGH);
|
||||||
Reference in new issue
Block a user