<div dir="ltr"><div dir="ltr">On Tue, Sep 18, 2018 at 3:00 PM, Neil Schemenauer <span dir="ltr"><<a href="mailto:nas-python@arctrix.com" target="_blank">nas-python@arctrix.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">The users of Python are pretty diverse so it depends on who you ask.<br>
Some would like a giant executable that includes everything they<br>
need (so of like the Go approach).  Other people want an executable<br>
that has just importlib inside it and then mix-and-match different<br>
shared libs for their different purposes.  Some will not want work<br>
"old school" and load from separate .py or .pyc files.<br>
<br>
I see no reason why we can't support all these options.<br></blockquote><div><br></div><div>Supporting those options is possible if a some of our simplifying assumptions are revisited.  Here are a few</div><div><br></div><div>We know about all the objects being stored in the data segment.  That makes it is easy to ensure that immutable objects are unique.  Knowing anything less, that work would have to be done at load-time.</div><div><br></div><div>We do not have to worry about the relocation cost of the pointers we add to the data segment.  We are compiled into an executable that typically gets loaded at a fixed address.  This could become a performance concern if we wrote our data into a shared library.</div><div><br></div><div>Because we are compiled into the runtime, we do not have versioning issues.  There is no possibility of PyObject_HEAD or any PyObject subclass being changed out from under us.  The existing marshal format abstracts away from these details but our format is very sensitive to the host environment.</div><div><br></div><div>All of these problems have technical solutions.  They should be evaluated carefully to ensure that the added overhead does not wipe-out the performance wins or add lots of complexity to the runtime.</div></div></div></div></div>