8 ms·
Another large part of using SSE for floating point arithmetic today is that while the floating point stack was very good for code-density (I still use older com
by whizzter 28d ago
Another large part of using SSE for floating point arithmetic today is that while the floating point stack was very good for code-density (I still use older compilers for size-optimized C code for demoscene intros), it was also quite painful in being stateful.
This is a large part of why "floating point to integer conversion is slow" cargo culting came from (probably disappeared today but was often seen back in the day).
Many x86 standard libraries emitted code that first set the floating point rounding mode before the storing conversion, you could use a /QIfist compiler option on MSVC to omit that but if you were unlucky to call some code that fiddled with the rounding mode your code would become unreliable (iirc unfortunally that did include some old D3D or OGL version).
With SSE iirc it's separate instructions for different rounding instead of a FPU mode.