commit | 055a59c3ed3ecd8f3cac4aa5496f3d21ab56a131 | [log] [tgz] |
---|---|---|
author | Dan Albert <danalbert@google.com> | Thu Sep 25 15:43:48 2014 -0700 |
committer | Dan Albert <danalbert@google.com> | Thu Sep 25 15:43:48 2014 -0700 |
tree | 9fc16be728c1054c8496e0d6ed5e41f16f69f334 | |
parent | 17e7d3208c68ff69819179d8a63ca234be2d1ab9 [diff] [blame] |
Prevent benchmarks from being optimized away. Change-Id: I2d27b39ecdfc50e78098314567c295a2f113f8d3
diff --git a/benchmarks/math_benchmark.cpp b/benchmarks/math_benchmark.cpp index a9748cd..8d6dd10 100644 --- a/benchmarks/math_benchmark.cpp +++ b/benchmarks/math_benchmark.cpp
@@ -20,8 +20,8 @@ #include <math.h> // Avoid optimization. -double d; -double v; +volatile double d; +volatile double v; static void BM_math_sqrt(int iters) { StartBenchmarkTiming();