Women in Technology

Hear us Roar



Article:
  The Performance of Java's Lists
Subject:   Comparing apples and oranges
Date:   2002-03-15 23:09:28
From:   mickylatowicki
An iteresting article, but it fails to recognize the fact that there are other usage patterns for a list, that should favor LinkedLists over ArrayLists.


In particular, when a ListIterator is used, and additions/removals are made from the location that the iterator is at.


For example: when the list has to be filtered by some criteria, it has to be fully traveresed anyway, and some of its items must be deleted. I should expect a LinkedList (used with a ListIterator) to outperform an ArrayList in such a case.