Comparisons

Two things routinely conflated, put side by side. Neither column is the winner — what decides is the workload and the machine.

Array traversal vs Linked-list traversal

Both O(n). The array wins by a wide margin because contiguity turns one miss into sixteen hits and lets the prefetcher run ahead; the list pays a dependent miss per node and can never overlap them.

Array traversalOpen lesson →
Strengths

Contiguous, prefetchable, one miss amortized over a whole line

Costs

Insertion in the middle moves elements; growth reallocates

Use when

You iterate more than you restructure — which is most of the time

Linked-list traversalOpen lesson →
Strengths

O(1) insertion given a node, and stable addresses

Costs

A dependent cache miss per node, and no spatial locality at all

Use when

You restructure constantly and rarely traverse, or nodes are large and stable

DimensionArray traversalLinked-list traversal
Complexity of traversalO(n)O(n)
Misses per elementOne per lineUp to one per element
Prefetcher can helpYesNo — the address is not known yet
Misses can overlapYesNo — each depends on the last