![]() |
|
![]() |
| I wouldn't be surprised if _mm_rsqrt_ps is actually implemented using the same bit level trick.
Same as Carmack's, we did a single step of Newton's method and it was definitely good enough. |
![]() |
| I dunno about Intel and AMD, but ARM and RISC-V use lookup tables for rsqrt. Unlike AMD and Intel, those tables are precisely defined in their respective specs. |
![]() |
| gpus reign supreme for games and scientific, and none of them are x86; larrabee failed. and you'd be surprised at the 3-d kinematics and control systems that people do with microcontrollers |
![]() |
| But that is what happened [1]. The article, which is probably the most definitive investigation to date, has Greg Walsh claim they invented the fast inverse square root while working at Ardent, which Wikipedia claims was founded in 1985 [2], to meet product performance benchmarks.
The Green Hills Software C compiler had a fast square root algorithm of similar form:
dating between 1983-1985 if I recall correctly. Also implemented to maximize floating point performance benchmarks, and again not drawn from academia. If my recollection is correct, that is one of the earliest known examples of the general technique and predates even the official IEEE 754 floating point specification which was not formally ratified until 1985 (but the standard was in development since 1977 and already de facto adopted by the time it was formally ratified).[1] https://www.beyond3d.com/content/articles/15/ [2] https://en.wikipedia.org/wiki/Stardent_Inc.#Ardent_Computer_... |
![]() |
| Noob here. Please ELI 5 what this algo used in quake 3 ?.
> Solve lighting equations Is it the light or laser effect when the gun is fired ? |
![]() |
| compiler engineers have been disappointing our 'surely no compiler would ever be so perverse as to do x' expectations for 25 years now, and it doesn't seem that they're likely to stop soon |
That being said, the techniques discussed here are not totally irrelevant (yet). There still exists some hardware with fast instructions for float/int conversion, but lacking rsqrt, sqrt, pow, log instructions, which can all be approximated with this nice trick.