YKarroum Blog: The true cost of linked lists.
Linked lists are often overused in introductory algorithmics courses, due to a heavy focus on theorical complexities. Unfortunatly, in practice, computers are complex beasts. They don’t execute instructions sequentially with the same cost. This means that a data structure with faster theorical complexities does not necessarily translate to a more efficient data structure in practice.
-
CPU cache miss: Locality of reference
-
Memory allocation cost: Region-based memory management