Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Faster code is not fine.

Faster code should only be written after finished product is shown to be too slow for purpose and after profiler has shown which parts of code are worth optimizing.



This can be too late for the product though. If you have real performance requirements for example you’re making a game and it needs to render at 60Hz optimising at the end can be an impossible task. This is also further complicated when data dependencies also impact performance. For example level designers need some understanding of the complexity of the scenes the game will be able to support.


You should always have a good idea of what part of the codebase will be the bottleneck when you write it. If you have that just optimize the things it spends time on. The only time you really need a profiler before optimizing is when you are micro optimizing to try to handle cpu ordering etc, other than that performance is mostly predictable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: