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

Comparing jsr166/src/test/loops/IntegerSum.java (file contents):
Revision 1.3 by dl, Fri Mar 22 18:41:30 2013 UTC vs.
Revision 1.4 by jsr166, Tue Jun 18 19:17:10 2013 UTC

# Line 157 | Line 157 | public class IntegerSum {
157      static long itest(Collection<Integer> c, int sum, int trials) throws Exception {
158          if (c == null) throw new Error();
159          Thread.sleep(250);
160 <        long tlast =  System.nanoTime();
160 >        long tlast = System.nanoTime();
161          for (int i = 0; i < trials; ++i) {
162              Integer psum = Integer.valueOf(checksum.get());
163              for (Integer x : c)
# Line 170 | Line 170 | public class IntegerSum {
170      static long stest(Collection<Integer> c, int sum, int trials) throws Exception {
171          if (c == null) throw new Error();
172          Thread.sleep(250);
173 <        long tlast =  System.nanoTime();
173 >        long tlast = System.nanoTime();
174          for (int i = 0; i < trials; ++i) {
175              int psum = c.stream().reduce
176                  (Integer.valueOf(checksum.get()), SUM);
# Line 182 | Line 182 | public class IntegerSum {
182      static long ptest(Collection<Integer> c, int sum, int trials) throws Exception {
183          if (c == null) throw new Error();
184          Thread.sleep(250);
185 <        long tlast =  System.nanoTime();
185 >        long tlast = System.nanoTime();
186          for (int i = 0; i < trials; ++i) {
187              int psum = c.parallelStream().reduce
188                  (Integer.valueOf(checksum.get()), SUM);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines