Logarithm with SSE, or switch to FPU?

前端 未结 2 1182
春和景丽
春和景丽 2021-01-12 00:31

I\'m doing some statistics calculations. I need them to be fast, so I rewrote most of it to use SSE. I\'m pretty much new to it, so I was wondering what the right approach h

2条回答
  •  -上瘾入骨i
    2021-01-12 01:27

    There seem to be a few SSE log2 implementations around, e.g. this one.

    There is also the Intel Approximate Maths Library which has a log2 function among others - it's old (2000) but it's SSE2 and it should still work reasonably well.


    See also:

    • sse_mathfun - SSE vector math library
    • avx_mathfun - AVX vector math library
    • libmvec - vector math library added in glibc 2.22

提交回复
热议问题