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

Comparing jsr166/src/test/loops/LongAdderLoops.java (file contents):
Revision 1.1 by dl, Mon Jan 26 14:23:10 2015 UTC vs.
Revision 1.4 by jsr166, Mon Jan 26 17:30:04 2015 UTC

# Line 4 | Line 4
4   * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7 import java.util.*;
7   import java.util.concurrent.atomic.LongAdder;
8   import java.util.concurrent.Executors;
9   import java.util.concurrent.ExecutorService;
10   import java.util.concurrent.Phaser;
11  
12   public class LongAdderLoops {
13 <    static final int ITERS = 10000000;
13 >    static final int ITERS = 100_000_000;
14      static final int NCPU = Runtime.getRuntime().availableProcessors();
15      static final int MAX_THREADS = NCPU * 2;
17    static final long NPS = (1000L * 1000 * 1000);
16  
17      static final ExecutorService pool = Executors.newCachedThreadPool();
18  
# Line 56 | Line 54 | public class LongAdderLoops {
54          final Phaser phaser;
55          final int incs;
56          volatile long result;
57 <        AdderTask(LongAdder adder, Phaser phaser, int incs) {
58 <            this.adder = adder;
57 >        AdderTask(LongAdder adder, Phaser phaser, int incs) {
58 >            this.adder = adder;
59              this.phaser = phaser;
60              this.incs = incs;
61          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines