From 055a59c3ed3ecd8f3cac4aa5496f3d21ab56a131 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 25 Sep 2014 15:43:48 -0700 Subject: Prevent benchmarks from being optimized away. Change-Id: I2d27b39ecdfc50e78098314567c295a2f113f8d3 --- benchmarks/math_benchmark.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'benchmarks') 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 // Avoid optimization. -double d; -double v; +volatile double d; +volatile double v; static void BM_math_sqrt(int iters) { StartBenchmarkTiming(); -- cgit v1.1