3 ms·
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 t
by rightbyte 6y ago
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.
- codr7 6y agoYou'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.