3 ms·
>Bit twiddling integers doesn't require unsafe type punning like this. Not only that but, at least for Fast Inverse Square Root, it's not advantageous to carry
by na85 5y ago
>Bit twiddling integers doesn't require unsafe type punning like this.
Not only that but, at least for Fast Inverse Square Root, it's not advantageous to carry out the bit twiddling since the rsqrtss instruction is faster and more precise, and vectorized instructions are faster still for large strings of floats.
- dr_zoidberg 5y agoBack when that code was used (in Quake 3, and before, a for a bit after it), there was no rsqrtss instruction.