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

Comparing jsr166/src/test/loops/BoxedLongSort.java (file contents):
Revision 1.7 by dl, Mon Apr 9 13:18:06 2012 UTC vs.
Revision 1.8 by jsr166, Sat May 5 17:09:23 2012 UTC

# Line 68 | Line 68 | class BoxedLongSort {
68              long now = System.nanoTime();
69              double total = (double)(now - start) / NPS;
70              double elapsed = (double)(now - last) / NPS;
71 <            System.out.printf("Arrays.sort   time:  %7.3f total %9.3f\n",
71 >            System.out.printf("Arrays.sort   time:  %7.3f total %9.3f\n",
72                                elapsed, total);
73              if (i == 0)
74                  checkSorted(a);
# Line 90 | Line 90 | class BoxedLongSort {
90              //            pool.invoke(new TaskChecker());
91              double total = (double)(now - start) / NPS;
92              double elapsed = (double)(now - last) / NPS;
93 <            System.out.printf("Parallel sort time:  %7.3f total %9.3f\n",
93 >            System.out.printf("Parallel sort time:  %7.3f total %9.3f\n",
94                                elapsed, total);
95              if (i == 0)
96                  checkSorted(a);
# Line 202 | Line 202 | class BoxedLongSort {
202                      Long al = a[l], ar;
203                      if (r >= rFence ||
204                          al.longValue() <= (ar = a[r]).longValue()) {
205 <                        ++l; t = al;
206 <                    }
207 <                    else {
208 <                        ++r; t = ar;
205 >                        ++l; t = al;
206 >                    }
207 >                    else {
208 >                        ++r; t = ar;
209                      }
210                  }
211                  else if (r < rFence)
212                      t = a[r++];
213 <                else
213 >                else
214                      break;
215                  w[k++] = t;
216              }
# Line 295 | Line 295 | class BoxedLongSort {
295          final Long[] src;
296          final Long[] dst;
297          final int lo, hi, size;
298 <        RandomRepacker(Long[] src, Long[] dst,
298 >        RandomRepacker(Long[] src, Long[] dst,
299                         int lo, int hi, int size) {
300              this.src = src; this.dst = dst;
301              this.lo = lo; this.hi = hi; this.size = size;
302          }
303 <        
303 >
304          public final void compute() {
305              Long[] s = src;
306              Long[] d = dst;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines