ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/jtreg/util/ArrayList/IteratorMicroBenchmark.java
(Generate patch)

Comparing jsr166/src/test/jtreg/util/ArrayList/IteratorMicroBenchmark.java (file contents):
Revision 1.11 by jsr166, Fri Nov 4 22:38:37 2016 UTC vs.
Revision 1.12 by jsr166, Sun Nov 13 01:28:11 2016 UTC

# Line 522 | Line 522 | public class IteratorMicroBenchmark {
522                          sum[0] = 0;
523                          v.removeIf(n -> { sum[0] += n; return false; });
524                          check.sum(sum[0]);}}},
525 +            new Job("ArrayList subList .removeIf") {
526 +                public void work() throws Throwable {
527 +                    int[] sum = new int[1];
528 +                    List<Integer> sl = asSubList(al);
529 +                    for (int i = 0; i < iterations; i++) {
530 +                        sum[0] = 0;
531 +                        sl.removeIf(n -> { sum[0] += n; return false; });
532 +                        check.sum(sum[0]);}}},
533              new Job("ArrayList subList get loop") {
534                  public void work() throws Throwable {
535                      List<Integer> sl = asSubList(al);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines