|
|
|
|
|
by stephencanon
1151 days ago
|
|
> for that there's still no better approach than using the Q_rsqrt idea Or you can just take a square root and divide; these are (partially-)pipelined operations on modern CPUs, with _much_ shorter latency than they had when "fast inverse square root" was a thing. It still has a niche, but that niche is very, very narrow today. |
|
Short of functions like exp and the trig functions, DIY approximations are usually not worth it these days. However, FP division getting faster has made these functions faster, too, since they can now use rational approximations rather than pure polynomials.