Wednesday
Room 2
10:20 - 11:20
(UTC+02)
Talk (60 min)
More Speed & Simplicity: Practical Data-Oriented Design in C++
While OOP class hierarchies are a C++ staple, they can sometimes lead to performance issues due to scattered data, or unintentionally obscure the core logic of data transformations.
Data-Oriented Design (DOD) presents a different way of thinking: prioritizing data layout not only unlocks significant performance gains via cache efficiency but can also lead to surprising simplicity in the code that actually processes the data.
This talk is a practical introduction for C++ developers familiar with OOP. Through a step-by-step refactoring of a conventional OOP design, we'll both cover how data access patterns influence speed and how a data-first approach can clarify intent.
We’ll measure the performance impact with benchmarks and analyze how the refactored code, particularly the data processing loops, can become more direct and conceptually simpler.
Key techniques like Structure-of-Arrays (SoA) vs. Array-of-Structures (AoS) will be explained and benchmarked, considering their effects on both execution time and code clarity. We’ll pragmatically weigh the strengths (performance, simpler data logic) and weaknesses of DOD, highlighting how it can complement, not just replace, OOP.
We'll also demonstrate that DOD doesn't necessitate abandoning robust abstractions, showcasing C++ techniques for creating safe, expressive APIs that manage both complexity and performance.
Let's learn how thinking "data-first" can make your C++ code faster and easier to reason about!