On Tue, Feb 2, 2010 at 1:35 PM, Collin Winter email@example.com wrote:
On Tue, Feb 2, 2010 at 12:49 PM, Brett Cannon firstname.lastname@example.org wrote:
On Tue, Feb 2, 2010 at 07:16, Antoine Pitrou email@example.com
Larry Hastings <larry@...> writes:
I ask you: why gunk up the filesystem with two files when one would do? I propose we change the pyc file so it can contain multiple code objects.
I think we should dump the lie about "optimized" bytecode when the only optimization is that we strip some docstrings, disable asserts and set
I think the hope has always been that the peepholer would be extended to do some tweaks that would only be reasonable under a -O flag. Obviously this has not happened and who knows if it ever will.
Unladen Swallow has a number of optimizations in mind that tweak corner cases of Python semantics, which we'd like to hide behind a compiler flag so that you have to explicitly ask for them. We haven't yet implemented these optimizations, since they will likely be controversial and require discussion. Feel free to remove the -O flag in the meantime; it can be added back later.
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.