Carmack or Michael Abrash? Read Graphics Programming Black Book ( http://www.amazon.com/Michael-Abrashs-Graphics-Programming-S... )
Abrash did amazing things with assembly to get Quake to run on the 486.
I don't know if Carmack, Abrash, or someone at SGI (it's in OpenGL source code too) came up with it; but it seems like witch craft to me.