Hi All Guido wrote: I remember vaguely that about two decades ago Greg Stein hatched an idea
for code objects loaded from a read-only segment in shared libraries.
[Thank you for this, Guido. Your memory is good.] Here's a thread from 2009, where Guido said: Greg Stein reached this same conclusion (and similar numbers) over 10 years ago ... Subject: Remove GIL with CAS instructions? https://mail.python.org/archives/list/python-ideas@python.org/thread/6ZONFLM... I looked up https://en.wikipedia.org/wiki/Compare-and-swap to read about CAS. Guido said this in the context of Antione's statement: Which makes me agree with the commonly expressed opinion that CPython would probably need to ditch refcounting (at least in the critical paths) if we want to remove the GIL. In 2007 Guido posted to Artima: It isn't Easy to Remove the GIL: https://www.artima.com/weblogs/viewpost.jsp?thread=214235 In this post Guido writes: In 1999 Greg Stein (with Mark Hammond?) produced a fork of Python (1.5 I believe) that removed the GIL, replacing it with fine-grained locks on all mutable data structures. [...] However, after benchmarking, it was shown that even on the platform with the fastest locking primitive (Windows at the time) it slowed down single-threaded execution nearly two-fold. Guido also referenced this write-up from Greg: https://mail.python.org/pipermail/python-dev/2001-August/017099.html I hope this helps. -- Jonathan