[Python-ideas] Disable all peephole optimizations

Nick Coghlan ncoghlan at gmail.com
Fri May 23 18:33:28 CEST 2014


On 23 May 2014 19:30, Victor Stinner <victor.stinner at gmail.com> wrote:
> 2014-05-23 11:11 GMT+02:00 Nick Coghlan <ncoghlan at gmail.com>:
>> Given how far away 3.5 is, I'd actually be interested in seeing a full
>> write-up of Eric's proposal, comparing it to the "let's just add some more
>> technical debt to the pile" -X option based approach.
>
> The discussion in now splitted in 4 places: 3 threads on this mailing
> list, 1 issue in the bug tracker. And there are some old discussions
> on python-dev.
>
> It's maybe time to use the power of the PEP process to summarize this
> in a clear document? (Write a PEP.)

Yes, I think so. One key thing this discussion made me realise is that
we haven't taken a serious look at the compilation behaviour since PEP
3147 was implemented. The introduction of the cache tag and the
source<->cache conversion functions provides an opportunity to
actually clean up the handling of the different optimisation levels,
and potentially make docstring stripping an independent setting.

It may be that the end result of that process is to declare "-X
nopeephole" a good enough solution and proceed with implementing that.
I just think it's worth exploring what would be involved in fixing
things properly before making a decision.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list