On a related note, there was a patch that I’d written for Python 3.6 to store 
code objects in the read only segment of the interpreter binary for faster 
interpreter startup.
I’d sent the patch to Larry Hastings, who graciously ported it to Python 3.8 
and posted it on bpo[1].

- Jeethu

[1]: https://bugs.python.org/issue34690

> On 21 Jun 2020, at 00:47, Guido van Rossum <gu...@python.org> wrote:
>
> Hm, I remember Greg's free threading too, but that's not the idea I was 
> trying to recall this time. There really was something about bytecode objects 
> being loaded from a read-only segment to speed up code loading. (Much quicker 
> than unmarshalling a .pyc file.) I don't think we ever got the details worked 
> out to the point where we could benchmark.
>
> On Sat, Jun 20, 2020 at 4:57 AM Jonathan Fine <jfine2...@gmail.com> wrote:
>
>> 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/6ZONFLMGCFP66AOMAFHY7ZB2VH3MUCM4/#XV3GBWJEYP7UAVSZXWRXABR7BVQMEKS2
>>
>> 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
>>
>>>
>
> --
>
> --Guido van Rossum (python.org/~guido)
> Pronouns: he/him [(why is my pronoun 
> here?)](http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/)
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/J3473XFSM6LLLTXL3BVXF67TJ64FHQGM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to