Performance (pystone) of python 2.4 lower then python 2.3 ???

Raymond Hettinger vze4rx4y at
Tue Dec 14 11:05:17 CET 2004

"Lucas Hofman
> This machine benchmarks at 38167.9 pystones/second

Pystone is an abyssmally bad benchmark for comparing the relative speeds of
different versions of python (it nets out all eval loop improvements and it
exercises only a microscopic portion of the language).

I would be interested in seeing other people's comparitive results for pybench,
test_decimal, and parrotbench.

To run, you first have to copy Lib/test/ into Py2.3's
lib directory.   On an old PentiumIII running WinMe, I get 48.940 sec in Py2.3
and 44.820 sec in Py2.4, a 8.4% improvement.

For pybench, I get 7418.90ms in Py2.3 and 6320.07 ms in Py2.4, a 14.8%

For parrotbench, I get 54.517 seconds in Py2.3 and 45.009 seconds in Py2.4, a
17.4% improvement.

It is also interesting to time specific features not covered by the above
benchmarks.  For example, list comprehensions got a nice 60% boost on my

C:\py24\Lib>\python23\python -r9 "[i for i in xrange(1000)]"
100 loops, best of 9: 1.11 msec per loop

C:\py24\Lib>\python24\python -r9 "[i for i in xrange(1000)]"
1000 loops, best of 9: 417 usec per loop

Raymond Hettinger

More information about the Python-list mailing list