mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Historically, the headers have been bumped some time after a file has been touched. Do it now to avoid having to touch them again in the future for that reason. -BEGIN VERIFY SCRIPT- sed -i --regexp-extended 's;( 20[0-2][0-9])(-20[0-2][0-9])? The Bitcoin Core developers;\1-present The Bitcoin Core developers;g' $( git show --pretty="" --name-only HEAD~0 ) -END VERIFY SCRIPT-
22 lines
545 B
C++
22 lines
545 B
C++
// Copyright (c) 2015-present The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include <bench/bench.h>
|
|
|
|
// Extremely fast-running benchmark:
|
|
#include <cmath>
|
|
|
|
volatile double sum = 0.0; // volatile, global so not optimized away
|
|
|
|
static void Trig(benchmark::Bench& bench)
|
|
{
|
|
double d = 0.01;
|
|
bench.run([&] {
|
|
sum = sum + sin(d);
|
|
d += 0.000001;
|
|
});
|
|
}
|
|
|
|
BENCHMARK(Trig, benchmark::PriorityLevel::HIGH);
|