summaryrefslogtreecommitdiff
path: root/misc/dotfiles
diff options
context:
space:
mode:
Diffstat (limited to 'misc/dotfiles')
-rw-r--r--misc/dotfiles/templates/benchmark.cpp17
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();