comparative performance benchmark Python 1.5.2 - 2.0 - 2.1

Frederic Giacometti frederic.giacometti at arakne.com
Sun Oct 21 14:06:38 EDT 2001


I have been puzzled this week when shown results of a simple benchmarck
between python 1.5.2, 2.0 and 2.1.
I am wondering; Has there been some official research on the issue ?
(pointers....?)

The benchmarking program was only basic python objects (strings,
dictionaries, string/flot conversions...).
In my haste to try do defend Python 2.1, we had done the changes I was aware
of: turn off garbage collection (20% gain), switch sre to pre (though this
program does not use 're'0; replace string.xxx() calls with o.xxx() string
methods.
I/O and file read actions account for less than 2 % to the time.

Still, we had these depressing results:
    Python 1.5.2 to Python 2.0:  +30% CPU time
    Python 2.0 to Python 2.1: +15% CPU time

The results where confirmed using either the Python profiler of the
opertating system time command.

This is far too much. It's beyond what I could explain; and this is deemed
not acceptable by the end users.
As result, I'm getting in the situation where I'm being asked to retroceed
all our developments from Python 2.1 to Python 1.5.2.
Any help for getting me out of this trap ?

Thanks,

Frederic Giacometti
Arakne, San Diego Supercompter Center







More information about the Python-list mailing list