Hacker News new | ask | show | jobs
by nine_k 1876 days ago
Cache misses can lead to major slowdowns.

Everything depends on the access patterns in critical loops. If you need most of the fields of a struct in each iteration, the classic way is beneficial. If you need a narrow subset (a "column") of fields in a large collection of objects, splitting objects into these columns speeds things up.

1 comments

The most upvoted stackoverflow question is about branch prediction (which is caching in a way):

https://stackoverflow.com/questions/11227809/why-is-processi...