Handmade Network»Forums
152 posts / 1 project
I am finalspace and do programming since more than 25 years, started on C64 and got serious with borland delphi. Nowadays i use C/C++ only.
Real world examples of data-oriented-design?
Edited by Finalspace on Reason: Initial post
Hi,

i recently had a conversion with a group of developers and we got into the topic of data-oriented-design vs object-oriented-design. We all knew the talks from mike acton and what not, so we was on the same page - but there was a few things we argued a lot about:

- Data-oriented-design does not work for real-world applications
- There are no proofen benefits from DOD vs OOP
- DOD is much harder to code than OOP
- OOP is better to maintain & test
- It is only useful for games, but not for any other type applications
- Computers are so fast, that there are no major difference between DOD and OOP

I think all those statements are wrong and you can solve most problems using a data-oriented approach, but its true that thinking and implementing it well is much harder - especially when you have those OOP mindset.

But as i could´n find any evidence or real-world examples - nobody believed me, even thou they knew all the talks . They simply stated, that there is no proofen benefit from data-oriented solutions -> All those talks shows arbitary examples, but no real world problems.

So now i am in search for real world code examples of positive usage of data-oriented solutions - including measurements from OOP vs DOD. So it would be great when you find one, to post it here. If needed i can make a github repo for that too ;)
Asaf Gartner
64 posts / 2 projects
Handmade Network Staff
Real world examples of data-oriented-design?
This is a common line of argument when discussing a popular approach vs. a less-popular approach. I've had this exact same argument many times regarding web frameworks.
The problem is that because your side is less popular, you'll most likely only find smaller and simpler examples. On top of that, when you bring those examples into the discussion people will be comparing your one specific example against the general idea of the popular approach, which always results in No True Scotsman arguments ("Sure it works for a small team/project, but it'll never work for our multi-year project with large teams"). I've mostly given up on these types of arguments (other than the occasional recreational argument) because I realized that they're not asking you to prove the merit of the less-popular approach, they're asking you to prove that the less-popular approach is popular, which it isn't (not yet at least).
70 posts
Professional programmer, working in the video games industry since 2012
Real world examples of data-oriented-design?
Hello,

Mike Acton joined Unity at the end of last year, and Unity has recently provided users to code in a data-oriented way, so that's a pretty big real-world example (and in a popular product, following Asaf's point), and the fact that they're moving FROM oop TO dop "proves" that they are looking for a better solution than OOP.

This is the video in which I learnt about this a few months ago: https://www.youtube.com/watch?v=_U9wRgQyy6s

Of course it doesn't counter the argument "DOP is only useful for games", even though Unity is also often used for more serious applications :p

I also believe that if you dive deep inside some popular libraries, you might find that their implementation is data-oriented, but I can't really give you an example of this.
511 posts
Real world examples of data-oriented-design?
The way graphics apis have evolved since the 90's also tells a lot.

It used to be a lot of separate knobs that had to be tweaked and each vertex' data supplied separately. But now you need to provide a bunch of data in buffers and a way to manipulate the data.

Also databases have been data oriented from the start. I don't think any successful ones ever made a (successful) dip into oop. Big Data would also fall into that.

High performance compute is another area to look at for cases.
Joshua Donahue
7 posts
None
Real world examples of data-oriented-design?
Edited by Joshua Donahue on Reason: more information
This is the most recent video I know of explicitly discusses using DoD on a large project: https://www.youtube.com/watch?v=g1TsP60z2OQ

Spoiler alert: DoD gave his project pretty significant performance increases, but he discusses the pros and cons of DoD versus the old OOP implementation.

He also lists some other DoD resources at the end of his talk (46:41)