3 ms·
How much of it you'd recommend to think of in advance when working on something vs the opposite guideline of avoiding premature optimization?
by shmerl 6y ago
How much of it you'd recommend to think of in advance when working on something vs the opposite guideline of avoiding premature optimization?
- adamnemecek 6y agoIt's not premature optimization since this is not something you can bolt on later.
- shmerl 6y agoA lot of optimizations can't be easily added later without redesign. But it doesn't mean they are always necessary. Question is, how deep to go first.
- adamnemecek 6y agoOk, but this one is literally an upfront architecture decision.
- shmerl 6y agoRight, but it's optimization focused one, so that was my question.
- adamnemecek 6y agoNo, it's an architecture. The speedup is a nice corollary.
- RussianCow 6y agoIt's an architecture that is specifically designed to maximize performance. I think few people would argue that it is more readable or simpler than most other common architectures.
- RussianCow 6y agoWhy not? There is no reason you couldn't implement data oriented design for a small part of your application, especially a tight loop that's become a bottleneck, without changing the architecture of the entire app.
- RussianCow 6y agoSome things you know in advance are obviously going to be computationally intensive, such as games; for those, you need all the performance you can get, so committing to data oriented design from the beginning has a lot of benefits. For everything else, you just have to decide if you think the tradeoff would be worth it. There is no easy answer here.