[Python-ideas] Re: Permanent code objects (less memory, quicker load, less Unix Copy On Write)

2020-06-20 Thread Jeethu Rao
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]:

[Python-ideas] Re: Permanent code objects (less memory, quicker load, less Unix Copy On Write)

2020-06-20 Thread Guido van Rossum
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

[Python-ideas] Re: "return if "

2020-06-20 Thread Vegard Stikbakke
On Sat, 20 Jun 2020 at 04:02, MRAB wrote: > On 2020-06-20 02:22, Robert DeLanghe wrote: > > You can already do compact conditional returns with the current syntax: > > > > def foo(a, b): > > return (a != b or None) and a * b > > > > > > or even: > > > > foo = (lambda a, b: (a !=

[Python-ideas] Re: Permanent code objects (less memory, quicker load, less Unix Copy On Write)

2020-06-20 Thread Jonathan Fine
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