Content deleted Content added
Line 10:
== Contrast with OOP ==
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
<ref>{{cite web|title=What's wrong with Object-Oriented Design? Where's the harm in it?|url=http://www.dataorienteddesign.com/dodmain/node17.html}}describes the problems with virtual function calls,e.g. i-cache misses</ref>
).
<ref>{{cite web|title=data oriented design - why you might be shooting yourself in the foot with OOP|url=http://gamesfromwithin.com/data-oriented-design}}</ref>
Although OOP does superficially seem to 'organise code around data', the practice is quite different. OOP is actually about organising [[source code]] around [[data types]], rather than physically grouping individual fields and arrays in a manner that is efficient for access by 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.
|