top | item 32880593

(no title)

julienpalard | 3 years ago

In someone lands here seeking a maintained compiler for Python, there's a lot, on top of my head:

- Pythran (https://pythran.readthedocs.io) (ahead of time compiler) - mypyc (https://mypyc.readthedocs.io/en/latest/) (ahead of time compiler) - cython (ahead of time compiler) - Numba (JIT) - Pypy (An interpreter doing JIT compiling) - Nuitka (Ahead of time, IIRC)

At this point we should build a "Awesome Python Compilers" repo ... oh wait, it obviously already exists: https://github.com/pfalcon/awesome-python-compilers

discuss

order

physPop|3 years ago

mypyc is alpha at best, I wouldn't put it in list of recommondations.

FreakLegion|3 years ago

Mypyc is stable for what it supports. Mypy itself is built with it. Black is built with it. I use it in production for some things, but use Nuitka for others. That decision is mostly down to a project's dependencies, not the project's own code. The more magic a Python module has, the harder it is to build AOT.

infinityio|3 years ago

numba can now also support ahead-of-time compilation, in some cases