3 ms·
Nice article, pray this mantra everyday > never optimize, always profile
by fibo 11y ago
Nice article, pray this mantra everyday
> never optimize, always profile
- yoklov 11y agoWhile theres a small but of truth in that, unfortunately reality is much more nuanced than this -- at least, it is when performance is non-negotiable. Optimization, when done correctly, is a feedback loop between your assumptions and the profiler. Neither one of these, on their own, is enough -- your assumptions can be wrong, but the profiler has an extremely poor signal to noise ratio. (Note: Profiling wouldn't have caught this issue, since the problem spot was not actually slow, it just made everything else slower) I work in game development (not primarily HTML5, although I have done HTML5/WebGL projects), and performance is a hard requirement for me. Not making 60fps reliably for the hardware we need to support is a show-stopping bug. The only way to avoid this reliably without needing to rewrite sections is to design with the optimizations you might need to perform in mind. Putting optimization off until the end would be irresponsible.