At first glance, theq_rsqrtfunction in theQuake III Arenasource code looks like a programmer’s prank. It features a handful of bit twiddles, a mysterious hexadecimal constant, and a single Newton refinement.
Yet, that odd little routine – the Fast Inverse Square Root – was called millions of times rendering 3D environments. It helped shape the performance…
