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

Comparing jsr166/src/test/jsr166e/LongAdderDemo.java (file contents):
Revision 1.2 by jsr166, Mon Aug 1 04:18:59 2011 UTC vs.
Revision 1.3 by dl, Sat Mar 26 12:35:00 2016 UTC

# Line 8 | Line 8 | import java.util.concurrent.Phaser;
8   import java.util.concurrent.ExecutorService;
9   import java.util.concurrent.Executors;
10   import java.util.concurrent.atomic.AtomicLong;
11 + //import java.util.concurrent.atomic.LongAdder;
12   import jsr166e.LongAdder;
13  
14   public class LongAdderDemo {
# Line 18 | Line 19 | public class LongAdderDemo {
19      public static void main(String[] args) {
20          System.out.println("Warmup...");
21          int half = NCPU > 1 ? NCPU / 2 : 1;
22 <        casTest(half, 1000);
22 >        //        casTest(half, 1000);
23          adderTest(half, 1000);
24  
25          for (int reps = 0; reps < 2; ++reps) {
26              System.out.println("Running...");
27              for (int i = 1; i <= NCPU * 2; i <<= 1) {
28 <                casTest(i, INCS_PER_THREAD);
28 >                //                casTest(i, INCS_PER_THREAD);
29                  adderTest(i, INCS_PER_THREAD);
30              }
31          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines