Re:Build a simple 2D physics engine for JavaScript games (2012)
by dahart on Wednesday August 24, 2022 @10:31AM
(#32579951)
Looks like it’s gotten better recently with ratios like 1.5x - 3x; it wasn’t that long ago that using the functional iterators was 10x slower than imperative loops. Still, I have a hard time choosing the functional iterators even the cases that are only 50% slower, and even though I prefer them for how clean and elegant it makes the code. Performance and energy use matters, especially in a physics engine. Defaulting to the slower style might not be visible initially, but is sapping cycles from every corner of the code.
[ Parent
| on HN ]
There are no comments on this comment yet.