Friday, April 08, 2011
exp(y*log(x)) Much Faster than Math.pow(x,y)
Today I found out that replacing Math.pow(x,y) by Math.exp(y*Math.log(x)) made me gain 50% performance in my program. Of course, both x and y are double in my case. I find this quite surprising, I expected better from Math.pow.