News for hackers. Stuff that matters.
Re:Why Python Is Slow: Looking Under the Hood (2014) by amelius on Thursday July 07, 2016 @05:34PM (#12052224)
This might certainly be true for single threaded programs. For multithreaded programs, Python has a bottleneck known as the "Global Interpreter Lock" (or GIL), which is not so easily optimized away, unfortunately.
Re:Why Python Is Slow: Looking Under the Hood (2014) by d0mine on Thursday July 07, 2016 @06:01PM (#12052342)
GIL may and does get released in the interpreter (on I/O) and C extensions such as regex, lxml, numpy. Performance sensitive extensions may even use multiple CPU cores implicitly e.g., as numpy.dot() can do for large enough input without changing the code in any way.
Re:Why Python Is Slow: Looking Under the Hood (2014) by retrogradeorbit on Friday July 08, 2016 @04:25AM (#12054214)
Yes, leading to C extensions that are not thread safe and so can't be used in multi-threaded code at all. An example I'm familiar with is pylibmc.
Re:Why Python Is Slow: Looking Under the Hood (2014) by d0mine on Sunday July 10, 2016 @03:47PM (#12066970)
Wrong. GIL does NOT necessarily make your Python/C code thread-safe and in reverse releasing GIL does not prevent you from writing a thread-safe code.
Re:Why Python Is Slow: Looking Under the Hood (2014) by amenod on Thursday July 07, 2016 @05:43PM (#12052264)
True, though this is not the kind of speed this article was talking about. You can get around that limitation somewhat by using multiprocessing module.

I'm not saying Python is the best language of all, but dissecting Python bytecode is kind of missing the point. Python's strong point is its ease of use.