4 ms·
mypyc does that: https://github.com/mypyc/mypyc https://github.com/mypyc/mypyc > Mypyc compiles Python modules to C extensions. It uses standard Python type hi
by dalf 3y ago
mypyc does that:
https://github.com/mypyc/mypyc https://github.com/mypyc/mypyc
> Mypyc compiles Python modules to C extensions. It uses standard Python type hints to generate fast code. Mypyc uses mypy to perform type checking and type inference.
> Mypyc can compile anything from one module to an entire codebase. The mypy project has been using mypyc to compile mypy since 2019, giving it a 4x performance boost over regular Python.
I have not experience a 4x boost, rather between 1.5x and 2x. I guess it depends on the code.