Why ArrayList Is the Default Choice Over LinkedList
Fast recall
Quick revision
Core answer
Whether you understand why real-world performance favors ArrayList despite LinkedList's textbook O(1) inserts
Defaulting to LinkedList for insert-heavy code without accounting for traversal and cache costs
Cite that even Java's own author Josh Bloch rarely uses LinkedList, and that cache misses dominate modern performance
Interview-ready guide
Interview answer
ArrayList is usually the default because real-world performance is driven by the CPU cache, and that's exactly where ArrayList shines.
It gives you constant-time random access, constant-time amortized append, and it stores just one reference per element in a compact backing array of references. That contiguity is the killer feature. When the CPU reads one element, it pulls in a whole cache line full of neighboring elements, and hardware prefetching keeps the data flowing, so iterating or scanning an ArrayList is extremely fast.
LinkedList looks good on paper because adding at the ends is constant time, but in practice that rarely pays off. Its nodes are scattered all over the heap, so following each next pointer is likely a cache miss and the CPU stalls waiting on memory — that's pointer chasing.
And the famous constant-time insertion only helps if you're already standing at the position, which usually means you first did a linear traversal to get there. On top of that, every LinkedList node has overhead — the value plus two references plus an object header — so it uses more memory and creates more garbage collection pressure.
A really common mistake is reaching for LinkedList because, quote, we do lots of inserts, without measuring. That's premature optimization and it usually ends up slower. Even Josh Bloch, who wrote much of the collections framework, has said he basically never uses LinkedList.
So my rule is simple: default to ArrayList, use ArrayDeque when I specifically need a queue or stack, and only pick something more exotic when a profiler proves there's a real bottleneck.
Why ArrayList Is the Default Choice Over LinkedList
Direct Answer
ArrayList wins by default because of O(1) random access, O(1) amortized append, low memory (one reference per element), and especially cache locality — a compact backing array of references makes iteration often faster than chasing scattered LinkedList nodes. LinkedList's theoretical O(1) inserts rarely pay off because you still traverse to the position and lose cache performance.
Common Mistakes & Pitfalls
- Premature optimization. Choosing LinkedList 'because we insert a lot' without measuring usually makes things slower.
- Ignoring traversal cost. O(1) insert is meaningless if reaching the spot is O(n).
- Forgetting cache misses. Modern performance is memory-bound; pointer chasing is expensive.
- Using LinkedList for queues.
ArrayDequeis the recommended, faster choice.
Check your understanding
Answer these without looking back at the article.
- Is there any modern use case where LinkedList is the right choice?
- How does CPU cache line size affect ArrayList performance?
- What List implementation would you use for a thread-safe read-heavy scenario?
Looking for a structured roadmap?
Every module on this page is also part of the full Java backend interview track.