Changeset View
Changeset View
Standalone View
Standalone View
src/bench/crypto_hash.cpp
// Copyright (c) 2016 The Bitcoin Core developers | // Copyright (c) 2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <bench/bench.h> | #include <bench/bench.h> | ||||
#include <bloom.h> | |||||
#include <crypto/ripemd160.h> | #include <crypto/ripemd160.h> | ||||
#include <crypto/sha1.h> | #include <crypto/sha1.h> | ||||
#include <crypto/sha256.h> | #include <crypto/sha256.h> | ||||
#include <crypto/sha512.h> | #include <crypto/sha512.h> | ||||
#include <crypto/siphash.h> | #include <crypto/siphash.h> | ||||
#include <hash.h> | #include <hash.h> | ||||
#include <random.h> | #include <random.h> | ||||
#include <uint256.h> | #include <uint256.h> | ||||
#include <util/time.h> | |||||
#include <iostream> | #include <iostream> | ||||
#include <string> | #include <string> | ||||
/* Number of bytes to hash per iteration */ | /* Number of bytes to hash per iteration */ | ||||
static const uint64_t BUFFER_SIZE = 1000 * 1000; | static const uint64_t BUFFER_SIZE = 1000 * 1000; | ||||
static void RIPEMD160(benchmark::State &state) { | static void RIPEMD160(benchmark::State &state) { | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |