[Python-Dev] Re: PEP 282 comments

Aahz aahz@pythoncraft.com
Fri, 22 Mar 2002 01:18:06 -0500


On Thu, Mar 21, 2002, Jeremy Hylton wrote:
>
> Aha!  I must have gone out of my way to miss this.  This is certainly
> a good thing.  In the case of the ZEO server, we put all the trace and
> debug level logging calls inside "if __debug__:"  We see a 20% speedup
> on compute intensive benchmarks when running with -O.  So avoiding the
> string formatting is a nice savings.

Hrm.  Based on previous comments, particularly from the Timbot, I'm
wondering whether the linkage between !debugging and optimizing is too
tight in Python, and whether constructs like this should be deprecated.
Seems to me that there will definitely be times you want debugging
output when you're running -O.
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"We should forget about small efficiencies, about 97% of the time.
Premature optimization is the root of all evil."  --Knuth