Let's be reasonable: Nuitka's sales pitch really isn't really a good source of information. And be aware that it doesn't say the code is converted or compiled to C. It just says it loads python code from C and runs it on the interpreter, which is basically what the python interpreter does.
I think my comment being devoid of content might have caused some frustration. So to make the best of everyone's time:
You can look into cython and pythran to see what I'm talking about.
cython lets you optimize code step by step via generating an html page with your code and highlighting lines that still require the use of the python runtime. It lets you add types and cdef function definitions in order to reduce your dependency on the python runtime.
Another good example is pythran, which takes your python code and turns it into c++ code to be compiled by a c++ compiler. I understand that this isn't a direct compilation to machine code, but a middle step which lets you compile the output to machine code.
Then there is numba and taichi which have just-in-time compilation decorators. Taichi also provides a sophisticated runtime which lets you run parts of the code on a GPU.
Surprisingly, the best performance I've experienced among these examples was numba + numpy, even though numba alone can sometimes have optimizations that surpasses all compilation efforts, because it turns your loops into mathematical formulas and runs them at O(1) complexity when it can.
Comments
Let's be reasonable: Nuitka's sales pitch really isn't really a good source of information. And be aware that it doesn't say the code is converted or compiled to C. It just says it loads python code from C and runs it on the interpreter, which is basically what the python interpreter does.
I think my comment being devoid of content might have caused some frustration. So to make the best of everyone's time:
You can look into cython and pythran to see what I'm talking about. cython lets you optimize code step by step via generating an html page with your code and highlighting lines that still require the use of the python runtime. It lets you add types and cdef function definitions in order to reduce your dependency on the python runtime.
Another good example is pythran, which takes your python code and turns it into c++ code to be compiled by a c++ compiler. I understand that this isn't a direct compilation to machine code, but a middle step which lets you compile the output to machine code.
Then there is numba and taichi which have just-in-time compilation decorators. Taichi also provides a sophisticated runtime which lets you run parts of the code on a GPU.
Surprisingly, the best performance I've experienced among these examples was numba + numpy, even though numba alone can sometimes have optimizations that surpasses all compilation efforts, because it turns your loops into mathematical formulas and runs them at O(1) complexity when it can.