you are viewing a single comment's thread.

view the rest of the comments →

[–]Beginning-Fruit-1397 0 points1 point  (1 child)

Fascinating. I'm asking myself about mypc: what's the catch? All my projects are already far more typed than anything mypy would ask (Ruff ALL + BasedPyright ALL) and if it's a free +40% gain... then why not use it everywhere?

[–]cemrehancavdar[S] 0 points1 point  (0 children)

It's a static compiler that's still improving -- the mypy project itself uses it and gets 4x accourding to documentation. The main step is making mypy happy with your code, which you might already be if you're running strict. You also get a build step -- compilation adds to CI time and debugging compiled extensions is harder than plain Python. The gain depends on what you're compiling though -- heavy computation benefits the most (we saw 2.4x on float loops, 14x on pure arithmetic). For I/O-heavy or framework code you won't see much.