List Traversal: Python `int`'s Cache-Unfriendly Pattern

Iterating a Python list of `int`s requires dereferencing pointers to separate `int` objects scattered in memory, preventing sequential cache prefetching and causing frequent cache misses compared to contiguous C arrays.

Sources

Open the full topic