
On Mon, 9 Sep 2019 11:04:22 -0700 Christopher Barker <pythonchb@gmail.com> wrote:
I'm surprised no one has mentioned Psyco yet -- probably because it evolved into PyPy -- but IIRC, Psycho was pretty much the same as what the OP is talking about -- direct Python to machine code, and easy on the fly or ahead of time compilation.
That's a good point.
If I recall, the "magic" for dealing with a dynamic language was that it was a "specializing" compiler -- if you call a function with, e.g. two integers as input, it could compile a special version that only worked with two integers, and thus could be native fast. (Armin even argued that it *could* be faster than C :-) ).
Not sure if this tool is doing anything like that, but it seems there are some pretty big limits as to what can be done without either a JIT (like PyPy), or type annotations (like Cython).
Psyco *was* a JIT, just a rather primitive one compared to other efforts such as PyPy. Also it was CPython-based, which led to various difficulties. Regards Antoine.