For an unsorted best choice, more than nine times out of ten will be: ArrayList, HashMap, HashSet.
Vector and Hashtable are synchronized and therefore can be a bit slower. It's rare that you need synchronized implementations, and when you make their interfaces are not rich enough to make their synchronization useful. In the case of Map, ConcurrentMap adds additional operations to make the interface useful. ConcurrentHashMap is a good implementation of ConcurrentMap.
LinkedList is almost never a good idea. Even if you do a lot of inserts and deletion, if you use an index to indicate the position, then to iterate through the list you need to find the correct node. ArrayList is almost always faster.
For Map and Set, hash options will be faster than tree / sorted. Hash algortihms tend to have O (1) performance, while trees will be O (log n).
Tom Hawtin - tackline Sep 07 '08 at 15:18 2008-09-07 15:18
source share