Re:Handles Are the Better Pointers (2018)
by rightbyte on Thursday August 13, 2020 @09:15AM
(#24142996)
Given that you iterate over the object fields in a "column like" manner, right? Random access should be slower since an object of say four elements would have to fetch four cache lines.
[ Parent
| on HN ]
You're more likely to have the next object cached by the time you access it compared to separate allocations.
The more sequential the access pattern is and the smaller the objects are, the greater benefit.