Is using Math.pow faster than multiplying myself?
843789Oct 21 2009 — edited Oct 22 2009Hi all,
Is it faster to use Math.pow to calculate a power than to, say, multiply it myself in a loop? How about if I'm just doing a square -- is it faster to use Math.pow(x,2) than x * x?
I noticed that the pow method in StrictMath has the keyword "native." Does this mean it's being done by the operating system? Does it mean it's being done directly in the hardware?
Thanks!
Tim