ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/MapMicroBenchmark.java
(Generate patch)

Comparing jsr166/src/test/loops/MapMicroBenchmark.java (file contents):
Revision 1.5 by jsr166, Thu Oct 29 23:11:03 2009 UTC vs.
Revision 1.6 by jsr166, Mon Nov 2 23:42:46 2009 UTC

# Line 236 | Line 236 | public class MapMicroBenchmark {
236          public long work(int len, int minIters, int maxIters, long timeLimit) {
237              Map m;
238              try {
239 <                m = (Map)mapClass.newInstance();
240 <            } catch(Exception e) {
239 >                m = (Map) mapClass.newInstance();
240 >            } catch (Exception e) {
241                  throw new RuntimeException("Can't instantiate " + mapClass + ": " + e);
242              }
243              Object[] ins = items;
# Line 365 | Line 365 | public class MapMicroBenchmark {
365      // more realistic
366      static void scramble(Object[] a) {
367          for (int k = 0; k < sizes.length; ++k) {
368 <            int origin = k == 0? 0 : sizes[k-1];
368 >            int origin = (k == 0) ? 0 : sizes[k-1];
369              for (int i = sizes[k]; i > origin + 1; i--) {
370                  Object t = a[i-1];
371                  int r = rng.nextInt(i - origin) + origin;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines