Data-oriented design: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
In [[computing]], '''Data oriented design''' (not to be confused with [[data-driven design]]) is a software optimisation approach motivated by [[cache coherency]], used in [[video game]] development. The approach is to focus on the data layout, separating and sorting [[field (computing)|field]]s according to when they are needed, and to think about transformations of data, rather than following an [[object-oriented]] design methodology.
 
These techniques became especially popular during the [[PS3]] and [[xbox 360]] console generation when the hazards of [[cache misses]] became pronounced due to their use of [[in-order processor]]s and high clock speeds.<ref>{{cite web|title = data oriented design|url=http://www.dice.se/wp-content/uploads/2014/12/Introduction_to_Data-Oriented_Design.pdf}}</ref>
In this approach code follows data, rather than the other way round. The claim is that [[object-oriented]] design principles result in poor data locality, especially if [[runtime polymorphism]] is used (which itself is especially problematic on certain processors).
 
These techniques became especially popular during the [[PS3]] and [[xbox 360]] console generation when the hazards of [[cache misses]] became pronounced due to their use of [[in-order processor]]s and high clock speeds.
 
Proponents include [[Mike Acton]].
 
=== Contrast with OOP ===
<ref>{{cite web|title = data oriented design|url=http://www.dice.se/wp-content/uploads/2014/12/Introduction_to_Data-Oriented_Design.pdf}}</ref>
 
The claim is that traditional [[object-oriented]] design principles result in poor data locality, especially if [[runtime polymorphism]] is used (which itself is especially problematic on certain processors). Although OOP does on the surface seem to 'organise code around data', the practice is quite different. OOP is actually about organising [[source code]] around [[data types]], rather than making the layout of individual fields and arrays convenient for specific functions. It also frequently hides layout details under [[abstraction layer]]s, whilst a data-oriented programmer wants to think about this first and foremost.
 
 
 
 
{{stub}}