Specialized double sha256 for 64 byte inputs

This commit is contained in:
Pieter Wuille
2017-09-26 18:29:42 -07:00
parent 57f34630fb
commit d0c9632883
4 changed files with 335 additions and 1 deletions

View File

@@ -52,6 +52,14 @@ static void SHA256_32b(benchmark::State& state)
}
}
static void SHA256D64_1024(benchmark::State& state)
{
std::vector<uint8_t> in(64 * 1024, 0);
while (state.KeepRunning()) {
SHA256D64(in.data(), in.data(), 1024);
}
}
static void SHA512(benchmark::State& state)
{
uint8_t hash[CSHA512::OUTPUT_SIZE];
@@ -94,5 +102,6 @@ BENCHMARK(SHA512, 330);
BENCHMARK(SHA256_32b, 4700 * 1000);
BENCHMARK(SipHash_32b, 40 * 1000 * 1000);
BENCHMARK(SHA256D64_1024, 7400);
BENCHMARK(FastRandom_32bit, 110 * 1000 * 1000);
BENCHMARK(FastRandom_1bit, 440 * 1000 * 1000);