Prevent benchmarks from being optimized away.
Change-Id: I2d27b39ecdfc50e78098314567c295a2f113f8d3
This commit is contained in:
parent
17e7d3208c
commit
055a59c3ed
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user