Just to let you know: binding Math.round to a variable rounded and calling rounded(...) rather than Math.round speeds my code up by approx. 100/1500 = approx. 7%! Additionally binding Math.max to max gave me a total of roughly 10% speedup(!)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just to let you know: binding
Math.round
to a variablerounded
and callingrounded(...)
rather thanMath.round
speeds my code up by approx. 100/1500 = approx. 7%! Additionally bindingMath.max
tomax
gave me a total of roughly 10% speedup(!)