Python Is Getting Faster: Major Performance Tweaks On Horizon

This report <https://www.theregister.com/2022/05/16/python_is_getting_faster/> on what is coming in CPython 3.11 and subsequent versions talks a lot about speed improvements. Several people have looked at removing the “GIL” (“Global Interpreter Lock”), which is the single biggest obstacle to improving multithreading performance. But some kind of lock is essential to maintain reference counting of dynamically-allocated objects. Get rid of these reference counts and you move to a Java-style pure-garbage-collected model, where you can end up consuming endless amounts of RAM unless you impose explicit limits on application size. But there is this new project called “nogil” (linked in the article). Their design overview document (hosted on Google Docs) talks about, not getting rid of reference counting, but implementing a more decentralized version of it, to minimize concurrency bottlenecks. This sounds quite hopeful.

On Tue, 17 May 2022 12:39:24 +1200, I wrote:
This report <https://www.theregister.com/2022/05/16/python_is_getting_faster/> on what is coming in CPython 3.11 and subsequent versions talks a lot about speed improvements.
Another report <https://devclass.com/2022/05/31/how-python-3-11-is-gaining-performance-at-the-cost-of-a-bit-more-memory/> talks about the new “adaptive specializing interpreter” (which is not quite a JIT) which will speed up code execution, at the cost of a bit more memory. Choice quote: Responding to recent Python 3.11 speed tests, one developer said that “this may be the first Python 3 that will actually be faster (about 5 percent) than Python 2.7. We’ve waited 12 years for this.”
participants (1)
-
Lawrence D'Oliveiro