Data-Oriented Design for Object-Oriented Programmers
Shachar Langbeheim
There’s intuitive code, and then there’s fast code. Most programmers today are taught Object Oriented Programming. OOP code is defined as interactions between objects, which is the way that human intuition tends to model the world. However, the resulting code isn't structured in a way that considers the actual instructions that a computer will run, and that’s why OOP might suffer performance loss. The more efficient paradigm, Data Oriented Design, pushes the programmers to write code that maximizes speed by removing abstract models and writing code according to how a computer will actually run it. However, DOD code is sometimes viewed as harder to read and less intuitive to people accustomed to OOP.
Both paradigms have their place in a programmer’s toolset, but the difficulty of the paradigm shift from OOP to DOD means that not enough programmers add the DOD perspective to their programming toolset. In this talk we’ll demonstrate that transitioning code from OOP to DOD is not necessarily complex, by showing an example of real world OOP-to-DOD code conversion. We’ll take OOP code, and chip away at it, thus showing the design process that allows us to create data-oriented code.
Shachar Langbeheim
A generalist coder, I enjoy being the jack of all languages, rather than an expert in one. I like learning new platforms and languages, and sharing what I learn in various forms, from internal tech-talks to conventions.
I'm one of the founders of the MakeGamesJLM video game making community, and work at Lightricks Ltd as a video-rendering engine coder.