- Joined
- Aug 13, 2018
The left one is the infamous Quake 3 Arena code for the inverse square root. Even with the comments it's not much better, and stands as a great example of why doing clever things might be 'cool' and efficient but should always be documented properly.
View attachment 3987453
The floating point trickery behind the fast inverse square root function is, in my opinion, the coolest code optimization of the last 30 years.