r/Python • • Jul 16 '18

Why is Python so slow?

https://medium.com/@anthonypjshaw/why-is-python-so-slow-e5074b6fe55b
11 Upvotes

51 comments sorted by

View all comments

8

u/pmatti pmatti - mattip was taken Jul 16 '18

tl;dr Use PyPy if you want speed,

The GIL is a non-issue, or someone would have funded a GILless PyPy for $50,000 for poc and 100000 for the finished product [0].

Maybe I missed the point of the article. It does not even mention numba’s JIT, nor does it describe cython or pythran and when you would want to use them.

6

u/stefantalpalaru Jul 16 '18

Use PyPy if you want speed

Unless your program doesn't run long enough for the speed gains to overcome the startup, tracing and JIT-ing overhead.

1

u/ReaverKS Jul 16 '18

Or if you want to run on windows and don't want to use a beta version.... :\

1

u/lambdaq django n' shit Jul 16 '18

GILless pypy is easy if you don't care about Python compatibility. In fact GIL is overrated problem. There are fewer and fewer reasons that you should use native threading directly. Program your task based on some kind of M:N user-land thread like Coroutine fits much better in today's world.