Skip to content
0:00 / 0:00

#data-orienteddesign#oop#cppcon

CppCon 2018: Stoyan Nikolov “OOP Is Dead, Long Live Data-oriented Design”

CppCon

189K subscribers • 94 videos on Hallway • Conference channel

YouTube
  • Recommended by 5 people: 3 on Hacker News, 1 on Lobsters and 1 curated list.
  • Presented by Stoyan Nikolov
  • Linked in the descriptionCppCon/CppCon2018
  • An opinion. It argues one side of a question engineers disagree on.

Intermediate. Assumes working knowledge.

271K views8 years ago5 recommendations

Software designSystems programmingData-oriented designC++Performance and optimization

Stoyan Nikolov introduces data-oriented design in C++ and shows how it improves performance and simplicity over traditional OOP, using examples from web browsers.

CppCon.org — Presentation Slides, PDFs, Source Code and other presenter materials are available at: github.com/CppCon/CppCon2018 — For decades C++ developers have built software around OOP concepts that ultimately failed us - we didn’t see the promises of code reuse, maintenance or simplicity fulfilled, and performance suffers significantly. Data-oriented design can be a better paradigm in fields where C++ is most important - game development, high-performance computing, and real-time systems. The talk will briefly introduce data-oriented design and focus on practical real-world examples of applying DoD where previously OOP constructs were widely employed. Examples will be shown from modern web browsers. They are overwhelmingly written in C++ with OOP - that’s why most of them are slow memory hogs. In the talk I’ll draw parallels between the design of systems in Chrome and their counterparts in the HTML renderer Hummingbird. As we’ll see, Hummingbird is multiple times faster because it ditches OOP for good in all performance-critical areas. We will see how real-world C++ OOP systems can be re-designed in a C++ data-oriented way for better performance, scalability, maintainability and testability. — Stoyan Nikolov, Coherent Labs AD Chief Software Architect Stoyan Nikolov is the Chief Software Architect and Co-Founder of Coherent Labs. He designed the architecture of all products of the company. Stoyan has more than 10 years experience in games. Currently he heads the development of Hummingbird - the fastest HTML rendering engine in the industry and of LensVR, the first VR-centric web browser. Previously he worked on multiple graphics & core engine systems and on large-scale ERP solutions. Stoyan has degrees in Applied Mathematics and Computer Graphics. He is interested in high-performance computing, graphics, multithreading, VR and browser development. Coherent Labs AD Coherent Labs is a leading game middleware company that develops cross-platform game user interface products. It aims to solve complex problems for major gaming companies such as Arena Net, NCSoft, Bluehole, and hundreds of others, and to help them create stunning and high-performance UI. Using its experience in web, game technologies, and user interface, the company is developing a Virtual Reality browser. — Videos Filmed & Edited by Bash Films: BashFilms.com Work at Hudson River Trading (HRT): tinyurl.com/safxfctf --- Videos Filmed & Edited by Bash Films: BashFilms.com

Why it's here

5 people recommend this

What people say. Highly recommended as a practical, real-world introduction to data-oriented design with concrete examples of its performance benefits over OOP.

programming-talkscurated list on GitHubRecommends

Under “Software Development”

OOP Is Dead, Long Live Data-oriented Design 01:00:45 by **Stoyan Nikolov** (2018)

phaedruson Hacker News • Recommends

On “C++17 constexpr Compile-time Ray Tracer (2017)”

That's a very good point. It might be question of high versus low level. From a video I watched today (the rest of the video is worth watching, too, but the following stand-alone quote is apropos): "Polymorphism and interfaces have to be kept under control. I don't believe that their role is in a very low level system like interpolating a couple of numbers in the animations, but they have their place in high level systems, in client facing APIs. They are amazing if you do a type of plug in and you really need some type of dynamic polymorphism." link to this video

michael_j_wardon Hacker News • Recommends

On “Practical Examples in Data Oriented Design”

Just adding a more recent video on it from CppCon 2018 where the presenter goes over a specific worked example. link to this video

nikki93on Hacker News • Recommends

On “Unity Software Inc S-1”

…d entity ids (that it keeps in sync properly). Then bind things to JS and allow you to code it from React, while still being able to eg. run an animation thread for some specific animations that just queries and reads/writes the `Layout` and `AnimationSpec`s etc. Interesting talk re: data oriented design for a webby animation engine here actually: link to this video…

inactive-useron Lobsters • Recommends

CppCon 2018: OOP Is Dead, Long Live Data-oriented Design

leni536on Hacker News • Mentions

On “Compress objects, not cache lines: an object-based compressed memory hierarchy”

In the article they mention that most programs are not dominated by arrays but objects. An other cure for that is to use arrays of primitives a lot more: link to this video

DeathArrowon Hacker News • Mentions

On “Classes vs. Data Structures”

People are starting to use data oriented design instead of OOP. Data oriented design doesn't hide state, is generally faster and easier to comprehend as it doesn't abstract too much. link link to this video link

drainyardon Hacker News • Mentions

On “Data-Oriented Design (2018)”

…ct and why it is applicable to game development, but also more generally. This talk by Mike Acton (Formerly Insomniac now Unity): link I recommend this talk all the time, since it is the one that got me convinced to look into DoD seriously. Also: More Mike Acton (now at Unity): link Stoyan Nikolov “OOP Is Dead, Long Live Data-oriented Design”: link to this video Overwatch Gameplay Architecture and Netcode (More specifically about ECS): link The main argument is that you work with data so you should care about data. All a program does is take some input, do something with it, and give you an output. If you structure your program around this mindset, a lot of problems become much simpler. Concurren…

valandon Hacker News • Mentions

On “Ask HN: How to improve code quality while maintaining decent velocity?”

Having your PR rejected in a healthy environment means that your PR is radically far from the reviewer's expectation. Having your PR rejected in a toxic environment can mean a lot of things, and a company sought after doesn't mean that it MUST be not toxic. First, you have to make sure if both of YOU and YOU ENVIRONMENT is healthy. If both are healthy, proceed reading. > The challenge here is to deliver good quality code, while maintaining a decent speed of delivery. You made it sound like producing good quality code = slowness. FALSE. Seeming slow, good quality code boosts your team's velocity. BUT keep in mind: "quality" is "the standard of something as measured against other things of a s…

valandon Hacker News • Mentions

On “Ask HN: What change in your programming technique has been most transformative?”

Static typings + type inference Parse, don't validate link All libs/products should be pure functions, with input output documented, making libs/products predictable Use in-app event sourcing to reduce the need for global states states DoD link to this video In non bare-metal languages, this will be useful for readability For errors, return instead of throw

nikki93on Hacker News • Mentions

On “Kosmonaut: web browser from scratch in Rust”

Some UI rendering engines for games do something like this, eg. link -- talk by one of the devs of that at link to this video

jfpardyon Hacker News • Mentions

On “Data-oriented design or why you might shoot yourself in the foot with OOP (2009)”

There's been a few talks: CppCon 2014: Mike Acton "Data-Oriented Design and C++": link CppCon 2018: Stoyan Nikolov “OOP Is Dead, Long Live Data-oriented Design”: link to this video Building a Data-Oriented Future - Mike Acton 2019: link And a blog/book has been created: link

u/BigOnLognin r/compsci • Mentions

On “DCIC: A new book for teaching beginners programming and computer science”

I haven't looked at the book, but I love this concept. Casey Muratori freed my mind on the subject. OOP is terrible. So many of the smartest people in the field have come to this conclusion on their own over the years: Mike Acton at CPP Con 2014 Stoyan Nikolov at CPP Con 2018 Mike Acton and Casey Muratori Discussing justifications for DOD Jonathan Blow (he gives yet more resources on the subject in his talk).

u/v-alan-din r/typescript • Mentions

On “Hi, what's the best resource to learn fp in Typescript ”

https://gcanti.github.io/fp-ts/ is nice and useful. I used it for years and those are productive years. https://effect.website/ is something in between and is somewhat easier. Some articles that's helpful: https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/ https://fsharpforfunandprofit.com/posts/designing-with-types-making-illegal-states-unrepresentable/ Tangential but effective to learn together link to this video

u/balheruin r/compsci • Mentions

On “What is Object Oriented programming actually used for?”

link to this video link to this video I mean, you can program in a data driven design in c++ if you feel like it. As was discussed in other threads, you can do ECS. Edit: I don't know it seems to me that the general consensus from. The state of the art is that, OOP is just not well suited for video games.