aboutsummaryrefslogtreecommitdiff
path: root/src/bench
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-07-15 15:12:59 +0200
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-07-15 15:35:11 +0200
commit7ebc365047ff526fdeeb4c5c4c9b6dd035a172a0 (patch)
tree3cc1196733b1e23064a8e0e25c0812d998762323 /src/bench
parent43125596ce7b2c6c9bd68368ff776702caab5152 (diff)
parentaddf18da951439f696dba163ae1c73458d43ea03 (diff)
Merge #19214: Auto-detect SHA256 implementation in benchmarks
addf18da951439f696dba163ae1c73458d43ea03 Call SHA256AutoDetect in benchmark setup (Pieter Wuille) Pull request description: It seems `SHA256AutoDetect()` was not being called in benchmarks, making the numbers only reflect the naive implementation. Fix this by calling it in bench_bitcoin's setup. ACKs for top commit: fjahr: tested ACK addf18da951439f696dba163ae1c73458d43ea03 pstratem: ACK addf18da951439f696dba163ae1c73458d43ea03 laanwj: ACK addf18da951439f696dba163ae1c73458d43ea03 Tree-SHA512: 3ba4b068145942df1429bf5913e3f685511e6ebeae2c1a3f9b8ac0144f6db1c7df456f88f480a2129f3e1602e3bf6a39530bb96e2c74c03ddb19324cec6799c7
Diffstat (limited to 'src/bench')
-rw-r--r--src/bench/bench_bitcoin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bench/bench_bitcoin.cpp b/src/bench/bench_bitcoin.cpp
index 1b75854210..1f872ce700 100644
--- a/src/bench/bench_bitcoin.cpp
+++ b/src/bench/bench_bitcoin.cpp
@@ -4,6 +4,7 @@
#include <bench/bench.h>
+#include <crypto/sha256.h>
#include <util/strencodings.h>
#include <util/system.h>
@@ -35,6 +36,7 @@ int main(int argc, char** argv)
{
ArgsManager argsman;
SetupBenchArgs(argsman);
+ SHA256AutoDetect();
std::string error;
if (!argsman.ParseParameters(argc, argv, error)) {
tfm::format(std::cerr, "Error parsing command line arguments: %s\n", error);