I came across this when I was in the process of optimizing parts of my code I've been working on:
http://ilab.usc.edu/wiki/index.php/Fast_Square_Root
Part of it gives an example:
inline float fastSqrt_2(const float x)
{
union
{
int i;
float x;
} u;
u.x = x;
u.i = (1<<29) + (u.i >> 1) - (1<<22);
return u.x;
}
Take 1/5 the time to process than sqrt().
It does give pretty good (but dirty) accuracy for calculating distance between objects. There are more accurate versions on the web page which still give faster results than "math.h" sqrt() function.
Warning! May contain Nuts!