General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Vitaly L
ThePrimeTime
comments
Comments by "Vitaly L" (@vitalyl1327) on "Prime React: Fast Inverse Square Root — A Quake III Algorithm" video.
What "todays CPUs"? Try cortex-M0, which does not even have an FPU. Also, even the fattest modern CPUs don't have a pipelined FDIV - so in rare cases where you have many square roots in a row, you won't get any reasonable throughput, and latency of FDIV is still dozens of clock cycles.
9
@gregorymorse8423 No, it is not 1 clock latency, there is not a single CPU that can do it. All the CPUs do 2 or 3 iterations, each made of a floating point multiply-accumulate.
2
@gregorymorse8423 name a microarch on which it is 1 clock cycle. It is 4 on Skylake, and in general 2-5 clock cycles, as you'd expect. Even on GPUs it is 3 or more clock cycles, with all the huge LUT optimisations.
1
@gregorymorse8423 and another thing for you to keep in mind, if you're talking about RSQRTSS and alike, they do even less than that, they only do LUT lookup for the first 12 bits of the result, and no consequent iterations, so the result is a total crap. The infamous Quake function did two iterations.
1