Re:Data-Oriented Design
by jackmott42 on Monday July 03, 2023 @12:15PM
(#36575066)
The advice of keeping the data you access frequently contiguous in memory applies to everything on modern hardware. If there is a program where performance is an issue at all, probably this will be one way to make sure performance is good.
[ Parent
| on HN ]
Re:Data-Oriented Design
by marcosdumay on Monday July 03, 2023 @12:43PM
(#36575468)
Well, if you want to generalize, it's about keeping data with correlated accesses close to each other and aligned inside memory pages, and failing that, yes to keep it at least contiguous. It's not exactly about access frequency, except that you want to optimize the things you access more.
Yes, that's a generic advice for high performance applications that is at least generic enough to apply on anything that is close to a normal computer. You will still need further details if you are talking about things like HPC (ironically) or mainframes, but it's general enough to say people should do it without qualifications.