News for hackers. Stuff that matters.
Re:No-GIL mode coming for Python by KMnO4 on Friday July 28, 2023 @08:15PM (#36915228)
GIL is a promise from the internal implementation (eg CPython) of Python that things will happen atomically within the Python interpreter. This means that when multiple threads try to access and modify Python objects at the same time, the GIL ensures that only one thread can execute Python bytecode at any given moment, preventing potential conflicts and ensuring data integrity. However, this comes at the cost of limiting the full utilization of multiple CPU cores for certain CPU-bound tasks.

Non-GIL adds some complexity to the implementation and some risk when writing multithreaded code at the benefit of improving performance.

Re:No-GIL mode coming for Python by fbdab103 on Friday July 28, 2023 @08:38PM (#36915459)
At the current implementation, GILless is a performance regression[0], of 5-7%

[0] https://peps.python.org/pep-0703/#performance

Re:No-GIL mode coming for Python by slt2021 on Friday July 28, 2023 @08:48PM (#36915540)
But people are not doing cpu bound tasks in native python (performance is a joke), it all comes down to calling a C library that is optimized for compute - what will be the change that GIL brings here?
Re:No-GIL mode coming for Python by AlphaSite on Friday July 28, 2023 @09:20PM (#36915741)
There is a JIT being built for Python, so performance is being attacked from 2 avenues, single threaded and multithreaded.