From 3c32023358065ddbad256a9fe7c1385592746d3e Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 21 Jul 2014 19:35:33 +0100 Subject: Avoid Math.min() benchmark being optimized away. This is a follow-up to https://android-review.googlesource.com/101914 Bug: 11579369 Change-Id: I68676879d1ac4d372e56cc0394eeb58f5cb41a84 --- benchmarks/src/benchmarks/regression/MathBenchmark.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'benchmarks/src') diff --git a/benchmarks/src/benchmarks/regression/MathBenchmark.java b/benchmarks/src/benchmarks/regression/MathBenchmark.java index 2227c7f..19b2162 100644 --- a/benchmarks/src/benchmarks/regression/MathBenchmark.java +++ b/benchmarks/src/benchmarks/regression/MathBenchmark.java @@ -302,7 +302,7 @@ public class MathBenchmark extends SimpleBenchmark { public long timeMinL(int reps) { long result = l; for (int rep = 0; rep < reps; ++rep) { - Math.min(l, l); + result = Math.min(l, l); } return result; } -- cgit v1.1