posted 19 years ago
ArrayList is always at least twice as fast than LinkedList.
ArrayList provides a collection backed by an array. It provides quick indexed access to its elements, and works best when elements are only added and removed at the end. By comparison, LinkedList is best when add and remove operations happen anywhere, not only at the end. But LinkedList's added flexibility comes at an added cost as it results in much slower indexed operations. So if you frequently access random elements, for example, you often make requests like "give me the value of element N", using an ArrayList is better. But if you frequently add and remove elements from positions other than the end, LinkedList is better.