3 ms·
Object pools pale in comparison to striping the data into arrays (or as we call it in the game dev world a Struct of Arrays) when it comes to reduced cache miss
by learc83 6y ago
Object pools pale in comparison to striping the data into arrays (or as we call it in the game dev world a Struct of Arrays) when it comes to reduced cache misses.
- rightbyte 6y agoGiven 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.