summaryrefslogtreecommitdiffhomepage
path: root/bench/critter.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-04-11 08:28:17 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-04-11 13:12:53 +0200
commita71d2c6b2ed5b558485eaa234513a2ce9f153dba (patch)
tree3db3c5afaac92e27c558d6c0020e8f2fe7e68694 /bench/critter.cpp
parent9ebe54046fe3f0d8759973b1f9117269adeae099 (diff)
bench: speed up when built with -O0
Diffstat (limited to 'bench/critter.cpp')
-rw-r--r--bench/critter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/bench/critter.cpp b/bench/critter.cpp
index 56bfa9b5..17c44617 100644
--- a/bench/critter.cpp
+++ b/bench/critter.cpp
@@ -332,11 +332,10 @@ void Critter_move(benchmark::State& st)
for (int i = 0; i < 2; i++)
test_critter();
for (auto _ : st)
- for (int i = 0; i < 10; i++)
- test_critter();
+ test_critter();
}
-BENCHMARK(Critter_move)->Unit(benchmark::kMillisecond);
+BENCHMARK(Critter_move)->Unit(benchmark::kMicrosecond);
} // namespace