News for hackers. Stuff that matters.
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.