News for hackers. Stuff that matters.
Re:Show HN: Canvas engines performance comparison – PixiJS, ... by fabian2k on Wednesday May 06, 2020 @05:53AM (#23089334)
You really don't need to measure to know that a tight loop inside a render function called at 60 fps is performance critical. The post does call this out explicitly as "in the middle of tight loops", which is a vary, very different situation than code that pretty much only runs once.

This is pretty far from premature optimization even if you never measure the effect, it is entirely predictable that code like this would have unnecessarily bad performance. If you write performance sensitive code you don't allocate stuff inside a tight loop unless you can't avoid it. The consequence of this is typically that the code is more straightforward imperative with fewer abstractions, but that is not inherently less readable.

Re:Show HN: Canvas engines performance comparison – PixiJS, ... by realharo on Wednesday May 06, 2020 @08:13AM (#23090072)
>it is entirely predictable that code like this would have unnecessarily bad performance

Unless the compiler optimizes it out...