If only 1% of cpu time was spent on slow square root, and this sped it up by 100%, it would be barely worth it.
If only 1% of cpu time was spent on slow square root, and this sped it up by 100%, it would be barely worth it.
Over 1,000%.
x87 fsqrt took ~70 cycles on the Pentium MMX x87, x87 fdiv was ~39 cycles - so doing inverse square root on x87 was ~109 cycles. The fast inverse square root routine was in the vicinity of 10 cycles.
In Quake, each vertex needed to have its normal vector calculated, which resulted in... I dunno, 100,000 inverse square root calculations per second, assuming you're pushing 100,000 polygons per second. Assuming a 100MHz CPU, the x87 inverse square root calculations would consume 11% of the CPU cycles, the fast inverse square root routine would consume 1% of the CPU cycles.
Also, a "mere" 1% speedup seems trivial for most general coding but squeezing 1% out of optimized game code is like blood from a stone. Add a bunch of similar tricks together and you can see 10-20% overall improvement which is huge.
If you can do 10,000 things with 1% cpu time, and you are now able to do 5,000 more things, is it still not worth it?