Since it's running mypyc (https://mypyc.readthedocs.io/en/latest/index.html ) on the imports under the hood, I'm struggling to see why you'd want to limit yourself to the standard library instead of just compiling your whole program as a module with mypyc directly?
At the same time, if the gains are consistent, I also feel that CPython should just compile an entire standard library on installation.
EDIT: benchmarks for mypyc look impressive, only exceptions are slower:
Since it's running
mypyc
(https://mypyc.readthedocs.io/en/latest/index.html ) on the imports under the hood, I'm struggling to see why you'd want to limit yourself to the standard library instead of just compiling your whole program as a module withmypyc
directly?At the same time, if the gains are consistent, I also feel that CPython should just compile an entire standard library on installation.
EDIT: benchmarks for
mypyc
look impressive, only exceptions are slower: