commit | 852d4fbbe9ddee0261c6b3dcadcd75185157ed46 | [log] [tgz] |
---|---|---|
author | Dan Albert <danalbert@google.com> | Thu Sep 25 22:52:53 2014 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Thu Sep 25 22:52:53 2014 +0000 |
tree | 9fc16be728c1054c8496e0d6ed5e41f16f69f334 | |
parent | 17e7d3208c68ff69819179d8a63ca234be2d1ab9 [diff] | |
parent | 055a59c3ed3ecd8f3cac4aa5496f3d21ab56a131 [diff] |
Merge "Prevent benchmarks from being optimized away."
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();