ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/ArrayDeque.java
(Generate patch)

Comparing jsr166/src/main/java/util/ArrayDeque.java (file contents):
Revision 1.109 by jsr166, Sat Nov 5 16:21:06 2016 UTC vs.
Revision 1.110 by jsr166, Sat Nov 5 17:45:44 2016 UTC

# Line 469 | Line 469 | public class ArrayDeque<E> extends Abstr
469              final Object[] es = elements;
470              for (int i = tail, end = head, to = (i >= end) ? end : 0;
471                   ; i = es.length, to = end) {
472 <                while (--i >= to)
472 >                for (i--; i > to - 1; i--)
473                      if (o.equals(es[i])) {
474                          delete(i);
475                          return true;
# Line 773 | Line 773 | public class ArrayDeque<E> extends Abstr
773                  throw new ConcurrentModificationException();
774              for (int i = cursor, end = head, to = (i >= end) ? end : 0;
775                   ; i = es.length - 1, to = end) {
776 <                for (; i >= to; i--)
776 >                // hotspot generates faster code than for: i >= to !
777 >                for (; i > to - 1; i--)
778                      action.accept(elementAt(es, i));
779                  if (to == end) {
780                      if (end != head)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines