/
githubmirror
/
bitcoin
Обзор
Документация
Войти
/
githubmirror
/
bitcoin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/bench/examples.cpp
21 строка
513 B
MarcoFalke
scripted-diff: Remove priority_level from BENCHMARK macro
13 янв 2026, 10:33
13 янв 2026, 10:33
fa51a28
Код
Авторство
О чём код?
// 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);