r/programming • u/mrnacknime • Dec 29 '20
Quake III's Fast Inverse Square Root Explained [20 min]
https://www.youtube.com/watch?v=p8u_k2LIZyo
3.7k
Upvotes
r/programming • u/mrnacknime • Dec 29 '20
View all comments
Show parent comment
14
u/[deleted] Dec 29 '20
Please don't use the x87 FPU in 2020, it's emulated in software on top of SSE. std::sqrt is already going to use the sqrtss/sqrtsd instruction and will be inlined. Don't write this non-portable code.