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

Dave Brueck dave at pythonapocrypha.com
Fri Jan 9 17:47:41 EST 2004


Peter wrote:
> Iwan van der Kleyn wrote:
> >
> > In other words: it would be nice if Python on average would run faster
> > so the need for optimisation would lessen.
>
> I disagree with the above.  My opinion has long been that Python runs
> adequately fast and that few people should need to spend much time on
> optimization.  Maybe that sort of view should be put to the test.
>
> 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! ;-)

I program in Python full-time and each spend approximately zero hours
optimizing. In the past two years I can think of two instances in which I went
into heavy optimization mode: one was for a web server that needed to handle
hundreds of requests per second and the other was a log processor that needed
to parse and process several gigabytes of log data per hour.

In the server I added a tiny C extension to make use of the Linux sendfile API,
all the other optimizations were algorithmic. In the log processor all the
optimizations ended up being either algorithmic or doing fewer dumb things
(like recomputing cacheable data).







More information about the Python-list mailing list