CppCon 2025 Missing Step: Making Data Oriented Design One Million Times Faster -- Andrew Drakeford
Registration is now open for CppCon 2025! The conference starts on September 13 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2025!
The Missing Step: Making Data Oriented Design One Million Times Faster
Tuesday, September 16 09:00 - 10:00 MDT
by Andrew Drakeford
Summary of the talk:
Data-oriented design (DOD) has gained traction for its practical approach to solving real-world problems. Refactoring data into an Entity-Component format sets the stage for cleaner, more efficient implementations, where lambdas process ranges and SIMD operations exploit the power of contiguous data layouts. DOD is widely recognised for addressing hardware-related performance challenges, but where do these challenges originate? The engineers behind our hardware platforms didn’t design performance bottlenecks; they created performance opportunities. By engineering how our code interacts with hardware, we can unlock these opportunities and achieve substantial speed-ups. The key lies in understanding and exploiting the state of the system. From the instruction cache and registers to the L1 cache and memory access patterns, the processor's statefulness plays a crucial role in performance. Writing "hardware-friendly" code is fundamentally about aligning with this state. But hardware is only part of the equation. What about the statefulness of our software? By carefully engineering the sequence of operations and algorithms to align with both hardware and software states, we can achieve unparalleled optimization. This is the missing step. Engaging with the design problem in full can be very difficult. We leverage George Polya’s problem-solving process and heuristics to guide our approach. This presentation explores these principles through real-world examples in machine learning and mathematical finance, demonstrating how addressing both sides of the problem can improve performance by orders of magnitude. (Yes, even six orders of magnitude.) Attendees will leave with insights into the exploration process and actionable techniques that might lead to achieving similar gains in their own work. It has been noted that some attendees might start drawing more diagrams when problem-solving and have an overwhelming urge to get Polya’s book.
Andrew Drakeford A Physics PhD who started developing C++ applications in the early 90s at British Telecom labs. For the last two decades, he has worked in finance developing efficient calculation libraries and trading systems in C++. His current focus is on making quant libraries more ecologically sound. He is a member of the BSI C++ panel.