Numba versus Cython
Numba is another way to get your Python code to become almost native to your host system by outputting the code to be run on LLVM seamlessly. Numba makes use of decorators such as the following:
@autojit
def myFunction (): ...
Numba also integrates with NumPy. On the whole, it sounds great. Unlike Cython, you only apply decorators to pure Python code, and it does everything for you, but you may find that the optimizations will be fewer and not as powerful.
Numba does not integrate with C/C++ to the extent that Cython does. If you want it to integrate, you need to use Foreign Function Interfaces (FFI) to wrap calls. You also need to define structs and work with C types in Python code in a very abstract sense to a point where you don't really have much control as compared with Cython.
Numba is mostly comprised of decorators, such as @locals
, from Cython. But in the end, all this creates is just-in-time-compiled functions with a proper native function signature. Since you can...