Look at the "Java Optimisations" book available at http://java.sun.com
There is a review of Collections, which are benchmarked according to their usage.
A quick reference :
Class Add Iterate Random Remove
ArrayList 0 ms 660 ms 0 ms 2,360 ms
LinkedList 50 ms 1,100 ms 26,800 ms 0 ms
Vector 0 ms 880 ms 0 ms 2,580 ms
TreeSet 330 ms 1,430 ms N/A 60 ms
HashSet 110 ms 1,430 ms N/A 50 ms
A quote from the book :
"These results illustrate how important the selection of algorithms and data structures can be. Look at the results from the different List implementations. ArrayList and Vector, two similar classes that are both array-based structures, show similar performance characteristics. Since Vector provides synchronization by default, it's slightly slower. If you compare the ArrayList and LinkedList results, however, you'll see that they have very different performance characteristics. While these two structures are capable of performing the same operations, operations that are practically free on the ArrayList are very costly with the LinkedList and vice-versa. The results also show how the set-based structures have very different performance characteristics from the list-based structures. "
I hope it could help you !
- Rabbit -
[ Note for french people : i've made a translation of this book. I can not yet distribute it, but i'm working on it ]



