There are tricks to calculate inverse of square root but those might ends up to be slower these days.
I was interested in the time difference between the two, and that way is surprisingly much much faster:
http://ideone.com/6iUX2Phowever, once i ran it on my own pc, the two are basically the same with no optimizations(sqrt is actually faster):
Resolution: 10000000
Time Taken for 1/sqrt(i): 0.0360257 seconds. Total Sum: 1997.9
Time Taken for InvSqrt(i): 0.0370257 seconds. Total Sum: 1996.03
but with optimizations, once again the fast InvSqrt beats 1/sqrt with a pretty high degree of improvement:
Resolution: 10000000
Time Taken for 1/sqrt(i): 0.0070153 seconds. Total Sum: 1997.9
Time Taken for InvSqrt(i): 0.0020014 seconds. Total Sum: 1996.03
however, we are talking about a fraction of a second, over a million iterations to see such differences, and at the cost of a minor bit of accuracy. i still think overall 1/sqrt is much simplier than this other method.
edit: actually, i also realize their's apparantly a minor diffrence in the results between ideone, and my pc, even though they are running the exact same code(although maybe the sqrt implementation might be diffrent, that InvSqrt is the same, yet here is a diffrence between the two?)