<br><div class="gmail_quote">On Tue, Feb 2, 2010 at 1:35 PM, Collin Winter <span dir="ltr"><<a href="mailto:collinw@gmail.com">collinw@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Tue, Feb 2, 2010 at 12:49 PM, Brett Cannon <<a href="mailto:brett@python.org">brett@python.org</a>> wrote:<br>
> On Tue, Feb 2, 2010 at 07:16, Antoine Pitrou <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>> wrote:<br>
>> Larry Hastings <larry@...> writes:<br>
>>><br>
>>> I ask you: why gunk up the filesystem with two files when one would do?<br>
>>> I propose we change the pyc file so it can contain multiple code<br>
>>> objects.<br>
>><br>
>> I think we should dump the lie about "optimized" bytecode when the only<br>
>> optimization is that we strip some docstrings, disable asserts and set __debug__<br>
>> to False.<br>
><br>
> I think the hope has always been that the peepholer would be extended<br>
> to do some tweaks that would only be reasonable under a -O flag.<br>
> Obviously this has not happened and who knows if it ever will.<br>
<br>
</div>Unladen Swallow has a number of optimizations in mind that tweak<br>
corner cases of Python semantics, which we'd like to hide behind a<br>
compiler flag so that you have to explicitly ask for them. We haven't<br>
yet implemented these optimizations, since they will likely be<br>
controversial and require discussion. Feel free to remove the -O flag<br>
in the meantime; it can be added back later.<br>
<font color="#888888"><br>
Collin Winter</font></blockquote><div><br></div><div>Anything new will need its own flag to enable/disable anyways (if it is insufficient to leave it to being done at runtime on a per module basis via a sys.xxx() call) as people already rely on today's exact behavior of -O.  We should never equate disabling assert statements (a change to the actual program logic) with actual optimization.</div>

<div><br></div><div>-gps</div><div><br></div></div>