A few days ago, Tony Albrecht posted the slides of his presentation titled “Pitfalls of Object-Oriented Design” [1]. Even though the title is really broad and could easily be misinterpreted, it’s not just a general bash on OOD. Instead, it’s very much focused on how object-oriented design is not a good match for high-performance apps (games) on modern hardware architectures with slow memory access and deep memory hierarchies. His proposed solution: Data-oriented design. Spot on!
If you haven’t seen the presentation, go download it right now. It’s really well put together and he has some great detailed examples on how caches are affected with traditional object-oriented design vs. a more data-oriented approach.
[1] Thanks to Christer Ericson for pointing that out.
He’s hardly alone with that. I believe Mike Acton has been a rather vocal proponent of that… (http://macton.smugmug.com/gallery/8936708_T6zQX#593426709_ZX4pZ for example..)
Now we just need a language that encourages that 😉
Hello,
it’s 5 years since you wrote that: “Now we just need a language that encourages that”. I’ve just came over topic DOD and I like it. I would like to know, if there is such language or if any language has capabilities to write easily DOD way. Since most of current languages are focused on OOP.
No mainstream languages that I’m aware of. Perhaps the closest one is the one that Jon Blow has been working on. In the meanwhile, C (even using some C++ features) is not a bad choice for DOD.
I’ve found Blow’s website: http://number-none.com/blow/ . However, it’s dead-end… Points to lerp.org which doesn’t exist.
Most of the information out there that I know of is from his talks. He hasn’t released the language yet. Check the youtube videos: https://www.youtube.com/user/jblow888/videos Start with this one: https://www.youtube.com/watch?v=TH9VCN6UkyQ