2.3-2.5 what improved?

bruno.desthuilliers at gmail.com bruno.desthuilliers at gmail.com
Wed Jan 17 13:56:14 CET 2007

Robin Becker a écrit :
> A large cgi based web Python-2.3 application needs to be speed improved.
> experiments show the following under reasonable testing (these are 2 second
> reportlab pdf productions)
> 1) 2.3 --> 2.5 improvement small 1-2%
> 2) cgi --> fcgi improvement medium 10-12%
> I sort of remember claims being made about 2.5 being 10% faster than 2.4/2.3 etc
> etc. Can anyone say where the speedups were?

AFAIK, most of the speedup comes from optimization of the builtin dict
type, which is the central
data structure in Python. But anyway, as Robert pointed out, using CGI
means lauching
a new Python process for each and every HTTP request.

> Presumably we have a lot of old
> cruft that could be improved in some way eg moving loops into comprehensions,
> using iterator methods etc. Are those sort of things what we should look at?

Consider profiling your code before doing anything else - unless you're
planning on wasting your time.

More information about the Python-list mailing list