3 ms·
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 itera
by nine_k 6y 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.
- tpxl 6y agoThe most upvoted stackoverflow question is about branch prediction (which is caching in a way): https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-processing-an-unsorted-array https://stackoverflow.com/questions/11227809/why-is-processi...