4 ms·
Pitfalls of Object Oriented Programming (2009) [pdf]
- tbrownaw 12y agoContext! Context! Context! This is about game programming, and how to optimize your data to be cache- and prefetch-friendly. If your data doesn't look like game data, or isn't accessed like game data, it won't help and the "pitfalls" aren't.
- a8da6b0c91d 12y agoIt applies to any operations over sets of data. Do you search or sort numeric or text data? Then this applies. You want to structure sets of things in contiguous blocks of memory to the extent possible.
- bunderbunder 12y agoI work more on the enterprise side of things, doing information analysis harrumphitywhatnot. My data tends to look a lot like the example in those slides, my performance drags look a lot like what those slides warned about, and a lot of the tricks I've come up with for keeping performance up look a lot like what was shown in the slides. Far from concluding that this doesn't apply to me because I don't work in C++ and I'm not a game developer, I think I need to take some more time to read the game development literature to see what else I can learn.
- def- 12y agoRelated: http://www.dataorienteddesign.com/dodmain/dodmain.html http://www.dataorienteddesign.com/dodmain/dodmain.html
- hawleyal 12y agoI wouldn't say these are pitfalls of OO. They are merely antipatterns in OO game programming (I might add, with any high-throughput data programming).
- vincetogo 12y agoA more accurate title might be something along the lines of "Optimizing Bottlenecks Improves Performance".
- jamii 12y agoI've really enjoyed reading http://bitsquid.blogspot.com/ http://bitsquid.blogspot.com/ . It runs right from the birth of their game engine right up to the recent acquisition by Autodesk. They are heavy proponents of data-centric design with flat layouts (no pointer graphs jumping all over memory). The result is a game engine where almost anything (from rendering pipelines to physics models to ai) can be changed, compiled and live-updated on a nearby console in under a second. EDIT: http://bitsquid.blogspot.com/2011/12/pragmatic-approach-to-performance.html http://bitsquid.blogspot.com/2011/12/pragmatic-approach-to-p... is a particularly good overview
- stcredzero 12y agoWe might also think of this as modern architectures being very badly suited for supporting these mechanisms for abstraction. This may indicate an opportunity.