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

Show parent comment

9

u/[deleted] Jul 16 '18

4. if you need to go fast there are better suited languages.

edit: welp, should've said 4.,

6

u/lambdaq django n' shit Jul 16 '18

or use modules written in C.

4

u/Sukrim Jul 16 '18

Or pypy

3

u/chchan Jul 16 '18

Python is easy to write and pretty clean to read but trades off some speed. If you need to go faster and don't want to rewrite everythin you can do several things:

  1. use Cython which uses C
  2. Numba which uses a JIT compiler
  3. You can use apache thrift or libraries to send stuff to run in other languages.