This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nedbat
Recipients ajaksu2, amaury.forgeotdarc, belopolsky, nedbat, rhettinger
Date 2008-04-01.13:23:14
SpamBayes Score 0.15597656
Marked as misclassified No
Message-id <1207056196.31.0.659698123414.issue2506@psf.upfronthosting.co.za>
In-reply-to
Content
It's hard for me to agree with your assessment that for no practical
good would come from disabling the optimizer.  Broadly speaking, there
are two types of code execution: the vast majority of the time, you
execute the code so that it can do its work.  In this case, speed is
most important, and the peephole optimizer is a good thing. But another
important case is when you need to reason about the code.  This second
case includes coverage testing, debugging, and other types of analysis. 

Compiled languages have long recognized the need for both types of
compilation, which is why they support disabling optimization entirely.

As Python becomes more complex, and more broadly deployed, the needs of
the two types of execution will diverge more and more.  More complex
optimizations will be attempted in order to squeeze out every last drop
of performance.  And more complex tools to reason about the code will be
developed to provide rich support to those using Python for complex
development.

I see discussion here of moving the optimizer to the AST level instead
of the bytecode level.  This won't change the situation.  The optimizer
will still interfere with analysis tools.

As a developer of analysis tools, what should I tell my users when their
code behaves mysteriously?
History
Date User Action Args
2008-04-01 13:23:16nedbatsetspambayes_score: 0.155977 -> 0.15597656
recipients: + nedbat, rhettinger, amaury.forgeotdarc, belopolsky, ajaksu2
2008-04-01 13:23:16nedbatsetspambayes_score: 0.155977 -> 0.155977
messageid: <1207056196.31.0.659698123414.issue2506@psf.upfronthosting.co.za>
2008-04-01 13:23:15nedbatlinkissue2506 messages
2008-04-01 13:23:14nedbatcreate