Angry Jesus writes:
We all know that python is slower than compiled languages like C. But what can you do about it? Jake VanderPlas, director of research in the physical sciences for the university of Washington's eScience institute, digs into python's internals to explain how it works and what program design choices you can make to use python efficiently.
One problem of Python that I didn't see mentioned is that of parallellization to make use of multiple cores. See Jeff Knupp, Python's Hardest Problem [jeffknupp.com] for a thorough explanation.
TL;DR: a fundamental issue with the Python interpreter is that it is not suitable for parallel execution. Only data crunching that does not involve running the interpreter (e.g., data crunching by compiled code) can be executed effectively in parallel.
This really is the largest problem with the CPython implementation. The JIL doesn't exist in Jython and I don't think in IronPython (.NET) but lingers on in the C interpreter.
The Multiprocessing package gets around this by spawning a real live Python process and then lets the OS handle the parallelism and that works very well. Python doesn't yet have a nice proper threading package without the lock.