Merge #19214: Auto-detect SHA256 implementation in benchmarks

addf18da95 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 addf18da95
  pstratem:
    ACK addf18da95
  laanwj:
    ACK addf18da95

Tree-SHA512: 3ba4b068145942df1429bf5913e3f685511e6ebeae2c1a3f9b8ac0144f6db1c7df456f88f480a2129f3e1602e3bf6a39530bb96e2c74c03ddb19324cec6799c7
This commit is contained in:
Wladimir J. van der Laan 2020-07-15 15:12:59 +02:00
commit 7ebc365047
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D

View file

@ -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);