File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 77#include < crypto/ripemd160.h>
88#include < crypto/sha1.h>
99#include < crypto/sha256.h>
10+ #include < crypto/sha3.h>
1011#include < crypto/sha512.h>
1112#include < crypto/siphash.h>
1213#include < hash.h>
@@ -43,6 +44,15 @@ static void SHA256(benchmark::Bench& bench)
4344 });
4445}
4546
47+ static void SHA3_256_1M (benchmark::Bench& bench)
48+ {
49+ uint8_t hash[SHA3_256::OUTPUT_SIZE];
50+ std::vector<uint8_t > in (BUFFER_SIZE,0 );
51+ bench.batch (in.size ()).unit (" byte" ).run ([&] {
52+ SHA3_256 ().Write (in).Finalize (hash);
53+ });
54+ }
55+
4656static void SHA256_32b (benchmark::Bench& bench)
4757{
4858 std::vector<uint8_t > in (32 ,0 );
@@ -99,6 +109,7 @@ BENCHMARK(RIPEMD160);
99109BENCHMARK (SHA1);
100110BENCHMARK (SHA256);
101111BENCHMARK (SHA512);
112+ BENCHMARK (SHA3_256_1M);
102113
103114BENCHMARK (SHA256_32b);
104115BENCHMARK (SipHash_32b);
You can’t perform that action at this time.
0 commit comments