[Python-ideas] Disable all peephole optimizations
Ned Batchelder
ned at nedbatchelder.com
Thu May 22 15:29:46 CEST 2014
On 5/22/14 4:25 AM, Nick Coghlan wrote:
>
>
> On 22 May 2014 12:00, "Ned Batchelder" <ned at nedbatchelder.com
> <mailto:ned at nedbatchelder.com>> wrote:
> >
> > I'm surprised at the amount of invention and mystery code people
> will propose to avoid having an off-switch for the code we already have.
>
> It's not the off switch per se, it's the documentation and testing
> consequences. Better to figure out a way to let the code generator and
> analysis tools collaborate more effectively than to complicate the
> execution model further.
>
The problem with "letting them collaborate more effectively" is that we
don't know how to do that. If we can come up with a way to do it, it
will involve much more complex code than I am proposing.
As far as documentation, we have three possibilities for optimization
level now. This will add a fourth. I don't see that as a burden.
On the testing front, if I were the developer of an optimizer, I would
welcome a switch to disable it, as a way to test that optimizations
don't change semantics. I understand that this is a different mode of
execution. I guess we have different opinions about the tradeoff of
risk and benefit of that new mode.
> Cheers,
> Nick.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140522/5359e559/attachment.html>
More information about the Python-ideas
mailing list