diff options
Diffstat (limited to 'misc/dotfiles')
-rw-r--r-- | misc/dotfiles/templates/benchmark.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/misc/dotfiles/templates/benchmark.cpp b/misc/dotfiles/templates/benchmark.cpp new file mode 100644 index 0000000..ff0519b --- /dev/null +++ b/misc/dotfiles/templates/benchmark.cpp @@ -0,0 +1,17 @@ +#include <benchmark/benchmark.h> + +static void BM_Baseline(benchmark::State& state) { + for (auto _ : state) { + __asm__("nop"); + } +} +BENCHMARK(BM_Baseline); + +static void BM_Treatment(benchmark::State& state) { + for (auto _ : state) { + __asm__("nop"); + } +} +BENCHMARK(BM_Treatment); + +BENCHMARK_MAIN(); |