A Python IDE idea - looking for input

Roy Smith roy at panix.com
Fri Jan 4 05:10:01 CET 2002


Gerhard Häring <gh_pythonlist at gmx.de> wrote:
> I've never needed to optimize Python code myself, except for
> interfacing OS stuff or for interfacing existing C libraries.

A fair amount of the python I write these days is reimplementing 
functionality which was previously done in perl.  Almost without excpetion, 
the perl version runs several times faster, which is a strong incentive to 
find ways to optimize my python code :-)

Usually, it's not hard to get a factor of 2 speedup with a little 
optimization.  The profiler will usually point you to the right places to 
start looking.  You will often find that a small handfull of lines of code 
represent 3/4 of the CPU time of your program (this is the ancient 80/20 
rule which has had remarkable longevity since the days of hand-coded 
assembler).



More information about the Python-list mailing list