I have a complex function that performs math operations that cannot be vectorized. I have found that using NUMBA jit compiler actually slows performance. It it probably because I use within this function calls to python math.sqrt.
How can I force NUMBA to replace calls to python math.sqrt to faster C calls to sqrt?
--
regards
Kes
Numba is mapping math.sqrt calls to sqrt/sqrtf in libc already.  The slowdown probably comes from the overhead of Numba.  This overhead comes from (un)boxing PyObjects and detecting if errors occurred in the compiled code.  It affects calling small functions from Python but less when calling from another Numba compiled function because there is no (un)boxing
If you set the environment variable NUMBA_OPT=3, aggressive optimization will turn on, eliminating some of the overhead but increases the code generation time.
how improve speed of math.sqrt() with numba jit compiler in python 2.7