diff options
Diffstat (limited to 'guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java')
-rw-r--r-- | guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java b/guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java index 288aa0c5c..afcca4012 100644 --- a/guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java +++ b/guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java @@ -18,6 +18,7 @@ package com.google.common.primitives; import com.google.caliper.BeforeExperiment; import com.google.caliper.Benchmark; + import java.util.Random; /** @@ -48,8 +49,7 @@ public class UnsignedLongsBenchmark { } } - @Benchmark - long divide(int reps) { + @Benchmark long divide(int reps) { long tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; @@ -58,8 +58,7 @@ public class UnsignedLongsBenchmark { return tmp; } - @Benchmark - long remainder(int reps) { + @Benchmark long remainder(int reps) { long tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; @@ -68,8 +67,7 @@ public class UnsignedLongsBenchmark { return tmp; } - @Benchmark - long parseUnsignedLong(int reps) { + @Benchmark long parseUnsignedLong(int reps) { long tmp = 0; // Given that we make three calls per pass, we scale reps down in order // to do a comparable amount of work to other measurements. @@ -83,8 +81,7 @@ public class UnsignedLongsBenchmark { return tmp; } - @Benchmark - long parseDecode10(int reps) { + @Benchmark long parseDecode10(int reps) { long tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; @@ -93,8 +90,7 @@ public class UnsignedLongsBenchmark { return tmp; } - @Benchmark - long parseDecode16(int reps) { + @Benchmark long parseDecode16(int reps) { long tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; @@ -103,8 +99,7 @@ public class UnsignedLongsBenchmark { return tmp; } - @Benchmark - int toString(int reps) { + @Benchmark int toString(int reps) { int tmp = 0; // Given that we make three calls per pass, we scale reps down in order // to do a comparable amount of work to other measurements. |