3 ms·
Numba and Cython are faster (for very small kernels) than Python interfacing into a C kernel via ctypes. This is not the same thing as a C kernel as part of a
by onalark 13y ago
Numba and Cython are faster (for very small kernels) than Python interfacing into a C kernel via ctypes. This is not the same thing as a C kernel as part of a C application. I hope I didn't falsely give that impression! You can see that for medium-size and above kernels, the call overhead makes very little impact on the code execution speed.
The C was compiled with the same flags used to compile Python. In this case: -O2 -g.
I don't have access to a MATLAB license to compare, but I would love to see this comparison done. Let me know if you need any help putting it together.