mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Add benchmark for MuHash finalization
This commit is contained in:
parent
66aa6a47bd
commit
91ce8cef2d
1 changed files with 14 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue