
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.