I know that the Numba function, calling another jitted function, recognizes this and automatically uses the quick convention of calling C, rather than passing through the layer of the Python object and, therefore, avoiding utility calls to the High Python function:
import numba
@numba.jit
def foo(x):
return x**2
@numba.jit
def bar(x):
return 4 * foo(x)
My question is: is the same true if I call the Cython function from Numba. So, let's say I have a Cython module foo.pyx:
cpdef double foo(double x):
return x**2
Like the standard Python module bar.py:
import numba
import foo
@numba.jit
def bar(x):
return 4 * foo.foo(x)
Will Numba be recognized foo.fooas a C-callable function automatically, or do I need to specify it manually, say, to create a CFFI wrapper?
EDIT: Cython "" Python. , : Numba Python?