Straw poll on Python performance (was Re: Python is far from a top performer ...)

Mike C. Fletcher mcfletch at rogers.com
Fri Jan 9 18:19:11 EST 2004


Dave Brueck wrote:

>Peter wrote:
>  
>
...

>>This is my "straw poll" question:
>>
>>  Do you spend a "significant" amount of time actually optimizing your
>>  Python applications?  (Significant is here defined as "more than five
>>  percent of your time", which is for example two hours a week in a
>>  40-hour work week.)
>>    
>>
>
>Yay, straw poll! ;-)
>  
>
Indeed, yay ;) .

I am often found optimising.  The total time spent on it is probably 
somewhere around 1-2% of total (after all, I do still *use* Python, it's 
not like it's killing me).  A lot of my projects are speed-sensitive 
(e.g. OpenGLContext trying to give interactive frame-rates in 3D 
scenegraph rendering, SimpleParse trying to create really fast parsers, 
web-sites trying to process 10s of thousands of records into summary 
views interactively), but I don't think I'm *that* far from the norm in 
the amount of time spent on optimisation.

I'd be surprised if there's not some difference between the experience 
of library programmers and application programmers in this regard.  
Library developers tend to need to focus more effort on performance to 
allow users of the libraries some inefficiencies in their usage.  That 
effort tends to be more in the planning stages, though, making sure 
you've chosen good algorithms, estimating work-loads and required 
throughput.  You try to make sure the library is robust and fast by 
designing it that way, not by trying to optimise it after the fact.  You 
plan for worst-case scenarios, and as a result you become "worried" 
about performance.  An application developer is normally going to use 
optimised libraries and just run with it, only needing to deal with 
unacceptable performance if it happens to show up in their particular 
project.

Anyway, back to it,
Mike

_______________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/







More information about the Python-list mailing list