I have done some testing about whether x*x
or Math.pow(x, 2)
is faster in Java. I was expecting simple x*x
to be somewhat faster, however, it turned out that its about equally fast. Can someone enlighten me, how is that possible, please?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…