--- jsr166/src/test/loops/IntegerMax.java 2013/03/22 18:41:30 1.3 +++ jsr166/src/test/loops/IntegerMax.java 2014/12/31 17:00:58 1.6 @@ -5,9 +5,9 @@ */ import java.util.*; -import java.util.function.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; +import java.util.function.*; public class IntegerMax { static final int SIZE = 1000000; @@ -76,15 +76,15 @@ public class IntegerMax { ctest(new TreeSet(), vlist, vmax, size, trials); ctest(new ConcurrentSkipListSet(), klist, kmax, size, trials); ctest(new ConcurrentSkipListSet(), vlist, vmax, size, trials); - + mtest(new HashMap(), keys, vals, kmax, vmax, size, trials); mtest(new IdentityHashMap(), keys, vals, kmax, vmax, size, trials); mtest(new WeakHashMap(), keys, vals, kmax, vmax, size, trials); mtest(new ConcurrentHashMap(), keys, vals, kmax, vmax, size, trials); - + mtest(new TreeMap(), keys, vals, kmax, vmax, size, trials); mtest(new ConcurrentSkipListMap(), keys, vals, kmax, vmax, size, trials); - + if (allClasses) { mtest(new Hashtable(), keys, vals, kmax, vmax, size, trials); mtest(new LinkedHashMap(), keys, vals, kmax, vmax, size, trials); @@ -173,7 +173,7 @@ public class IntegerMax { static long itest(Collection c, int max, int trials) throws Exception { if (c == null) throw new Error(); Thread.sleep(250); - long tlast = System.nanoTime(); + long tlast = System.nanoTime(); for (int i = 0; i < trials; ++i) { Integer pmax = Integer.valueOf(Integer.MIN_VALUE - checksum.get()); for (Integer x : c) @@ -186,7 +186,7 @@ public class IntegerMax { static long stest(Collection c, int max, int trials) throws Exception { if (c == null) throw new Error(); Thread.sleep(250); - long tlast = System.nanoTime(); + long tlast = System.nanoTime(); for (int i = 0; i < trials; ++i) { int pmax = c.stream().reduce (Integer.valueOf(Integer.MIN_VALUE - checksum.get()), MAX); @@ -198,7 +198,7 @@ public class IntegerMax { static long ptest(Collection c, int max, int trials) throws Exception { if (c == null) throw new Error(); Thread.sleep(250); - long tlast = System.nanoTime(); + long tlast = System.nanoTime(); for (int i = 0; i < trials; ++i) { int pmax = c.parallelStream().reduce (Integer.valueOf(Integer.MIN_VALUE - checksum.get()), MAX);