Re:Show HN: Fast.js – faster reimplementations of native Jav...
by AshleysBrain on Tuesday June 24, 2014 @07:41PM
(#7941399)
Having written a major HTML5 game engine, I've ended up micro-optimizing JS code after small functions really did show up high in profiling measurements. One example: calculating a bounding box from a quad involved code along the lines of Math.min(a, b, c, d) followed by Math.max(a, b, c, d). Replacing that with a tree of ifs to determine both the minimum and maximum at once was faster and moved the bottleneck elsewhere.
[ Parent
| on HN ]
Re:Show HN: Fast.js – faster reimplementations of native Jav...
by ulisesrmzroche on Wednesday June 25, 2014 @10:03AM
(#7943901)
You're better off just minimizing your JS if you didn't do that. It's browser render speed that kills you in vidjagames, not function speed.