mypyc for the stdlib #423
RonnyPfannschmidt
started this conversation in
Ideas
Replies: 2 comments 1 reply
|
Pickle has a C version already so presumably there isn't a huge benefit there. Experience from Cython suggests maybe a 20% speed-up if you just compile Python code directly. I image mypyc would be a similar order of magnitude. I think the idea of compiling bits of the standard library with Cython has been discussed and rejected before (mainly because it'd add a third party dependency). I don't know if mypyc is a little more "affiliated" and so would be more acceptable. Especially if the code didn't need to be adapted so could run without mypyc |
1 reply
|
Compatibility is going to be a big issue if using mypyc. Fwiw, using mypyc on black is about a 2x speed up (without too much optimisation). mypyc on mypy is a 3.5-4x speed up. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
with the classical approach to speedups in the stdlib being porting to c,
i was wondering how well it might work to use tools like mypyc to turn the python into c
possible candidates for that are at least logging, pathlib, warnings, pickle, single_dispatch
naive enthusiasm projects potentially big wins, but compatibility may be tricky
All reactions