Numba (AOT) vs Nuitka

Viewed 1047

Numba (AOT) and Nuitka both provide compiling your Python code into C code. At least the C code produced by Nuitka binds against the Python standard library, so the C code heavily relies on PyObjects. In other words, the code does not look like C code a human would have written if written from scratch. The resulting machine code is thus somewhat verbose if you will. I am not sure how Numba's ahead-of-time (AOT) compilation works though. This is as much as I know. My questions:

  1. How does Numba (AOT) do it and
  2. how does it compare to Nuitka in terms of speed?

Note, that I do not talk about Numba's just-in-time (JIT) compilation, which is the default compilation mode for Numba. JIT can consider the specific CPU, which AOT cannot - so JIT is faster during runs than AOT, but requires warm-up phases in which it is slower (compiling and loading). Thus a comparison would be somewhat unfair.

0 Answers
Related