3 ms·
Yup I'm a fan of Mike Acton as well, always fun to show someone who hasn't seen Data Oriented Design a path to a 10-50x perf improvement that they didn't think
by vvanders 10y ago
Yup I'm a fan of Mike Acton as well, always fun to show someone who hasn't seen Data Oriented Design a path to a 10-50x perf improvement that they didn't think was possible.
Back when I first saw it was in one of Bruce Dawson's courses where we did simple image manipulation. I think the task was to implement bitblit(move one rect of a bitmap into another rect on another bitmap).
I remember him grabbing one random student's assignment, throwing in some rudimentary timing and then saying, "lets see if we can do any better". By the end of ~15 minutes he'd sped the thing up 800x with a combination of reading by row rather than column, aligned reads and some other tricks that looked like black magic at the time. Looking back now it all seems fairly obvious once you know how the hardware works.
Good times.
- stagger87 10y agoWhy call it data oriented design? Why not just call it what it is? Cache optimization.
- dottrap 10y agoBecause it isn't just about cache optimization. How you organize your data impacts the types of transformations that can and need to be done. Utilizing SIMD is another thing that is extremely sensitive to data layout.
- vvanders 10y agoYup also relevant for subsystems that need to shuffle data across a bus like the SPUs on the PS3 that only have 256kb of addressable memory.