Use iterator() in AbstractList.equals() instead of listIterator()

Roman Leventov leventov.ru at gmail.com
Fri Apr 6 21:35:25 UTC 2018


iterator() has chances to be slightly more efficient than listIterator().
At very least AbstractList's own ListItr implementation contains one more
implicit field referencing the base class, so objects of
AbstractList.ListItr are often 8 bytes bigger than objects of
AbstractList.Itr.


More information about the core-libs-dev mailing list