3 ms·
I could see sqrtf(x) being faster than 1/rsqrt(x). An integer software implementation of sqrt and division will be similar (in fact, I think if implemented with
by creato 5y ago
I could see sqrtf(x) being faster than 1/rsqrt(x). An integer software implementation of sqrt and division will be similar (in fact, I think if implemented with Newton's method, sqrt will be significantly faster), and you still have to compute rsqrt.
But, if you were computing 1/sqrt(x), I highly doubt the quake3 style rsqrt(x) was slower than that. If both implemented with software floats, rsqrt(x) would be strictly less work. They're almost the same computation, except you'll probably get a better initial guess for rsqrt (the "what the fuck" line), and each iteration produces more accuracy.