diff options
author | Vladimir Marko <vmarko@google.com> | 2014-07-21 19:35:33 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2014-07-21 19:38:17 +0100 |
commit | 3c32023358065ddbad256a9fe7c1385592746d3e (patch) | |
tree | e4715787e6314a78487b357257c2eee74454ab58 /benchmarks/src | |
parent | fbf2339d9360d660475ac9909c59ef65512c5f49 (diff) | |
download | libcore-3c32023358065ddbad256a9fe7c1385592746d3e.zip libcore-3c32023358065ddbad256a9fe7c1385592746d3e.tar.gz libcore-3c32023358065ddbad256a9fe7c1385592746d3e.tar.bz2 |
Avoid Math.min() benchmark being optimized away.
This is a follow-up to
https://android-review.googlesource.com/101914
Bug: 11579369
Change-Id: I68676879d1ac4d372e56cc0394eeb58f5cb41a84
Diffstat (limited to 'benchmarks/src')
-rw-r--r-- | benchmarks/src/benchmarks/regression/MathBenchmark.java | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |