comparative performance benchmark Python 1.5.2 - 2.0 - 2.1

Neil Schemenauer nas at python.ca
Sun Oct 21 14:46:51 EDT 2001


Frederic Giacometti wrote:
> 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 ?

Benchmarking is hard:

    spud ~$ python1.5 pystone.py 
    Pystone(1.1) time for 10000 passes = 1.33224
    This machine benchmarks at 7506.16 pystones/second
    spud ~$ python2.0 pystone.py
    Pystone(1.1) time for 10000 passes = 1.38104
    This machine benchmarks at 7240.92 pystones/second
    spud ~$ python2.1 pystone.py
    Pystone(1.1) time for 10000 passes = 1.04334
    This machine benchmarks at 9584.57 pystones/second
    spud ~$ python2.2 pystone.py
    Pystone(1.1) time for 10000 passes = 0.975024
    This machine benchmarks at 10256.2 pystones/second

Are you sure you're using the same options to compile all versions of
the interpreter?  Python 1.5.2 had threading disabled by default.  That
makes a significant difference.  If you're on a x86 machine with GCC try
compiling 2.x with "-O2 -m486".  When you disabled GC did you do it
using configure or with gc.disable()?  What is your benchmark?

  Neil




More information about the Python-list mailing list