Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bitop.bench.cpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
3// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5// =====================
6
8#include <benchmark/benchmark.h>
9
10using namespace benchmark;
11
12void count_leading_zeros(State& state) noexcept
13{
14 uint256_t input = 7;
15 for (auto _ : state) {
16 auto r = count_leading_zeros(input);
17 DoNotOptimize(r);
18 }
19}
21
22// NOLINTNEXTLINE macro invokation triggers style errors from googletest code
BENCHMARK(count_leading_zeros)
BENCHMARK_MAIN()
void count_leading_zeros(State &state) noexcept