The answer "he has JIT" is technically correct, but insufficient. PyPy, executed as Python code by the Python interpreter, can JIT compile the Python code that it interprets (in fact, JIT tests often run this way), but are still terribly slow (it may take a few minutes to start the interpretation).
The missing part, which precedes JIT and is actually required for JIT, writes the interpreter in a limited subset of Python (called RPython) and then compiles it into C code. This way you get a program that runs at roughly the level of C abstraction (despite that it is written as a higher level of abstraction). This interpreter has historically been, and AFAIK is still somewhat slower than CPython, but not several orders of magnitude slower (as an interpreted interpreter).
Your comment about compiling directly to the assembly is confusing. Assembly code will not be automatically faster than C code - in fact, it will be difficult for you to surpass today's C compilers in generating assembly code, and C code is much easier to write and / or generate without even getting into any portability mess. The problem is not to turn Python into C or assembly (look at Nuitka), the problem is to rephrase the program more efficiently without affecting semantics. Going straight to the assembly does not solve any of the difficult problems with this, makes the relatively easy task of generating code for a more efficient program more difficult, and very rarely allows any optimizations that you also cannot express in C.
PyPy JIT now generates machine code, but the PyPy executable is compiled from C code by the C compiler. PyPy developers would be idiots if they tried to compete with existing C compilers on the same platform, not to mention several platforms. Fortunately, they are not idiots and know this. The reasons that JITs generate assembly code are different and much better (for starters, there are several optimizations in the JIT context that you cannot do in C).
By the way, most of what I wrote above is also indicated in the answers to the question that you are referring to.
source share