Move bench_volatile_loop to benchmarks/
This commit is contained in:
12
benchmarks/bench_volatile_loop.cpp
Normal file
12
benchmarks/bench_volatile_loop.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <nanobench.h>
|
||||
|
||||
int main() {
|
||||
constexpr int loopIterations = 1200;
|
||||
ankerl::nanobench::Bench().run(
|
||||
"volatile loop to " + std::to_string(loopIterations), [&] {
|
||||
for (volatile int i = 0; i < 1200; i = i + 1)
|
||||
;
|
||||
});
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user