comparative performance benchmark Python 1.5.2 - 2.0 - 2.1

Tim Peters tim.one at home.com
Sun Oct 21 15:24:46 EDT 2001


[Neil Schemenauer]
> 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

Heh.  Try it w/ a single Python on Win98SE:

C:\Code\python\Lib\test>..\..\pcbuild\python pystone.py
Pystone(1.1) time for 10000 passes = 0.835184
This machine benchmarks at 11973.4 pystones/second

C:\Code\python\Lib\test>..\..\pcbuild\python pystone.py
Pystone(1.1) time for 10000 passes = 1.24632
This machine benchmarks at 8023.64 pystones/second

C:\Code\python\Lib\test>..\..\pcbuild\python pystone.py
Pystone(1.1) time for 10000 passes = 1.22768
This machine benchmarks at 8145.44 pystones/second

C:\Code\python\Lib\test>..\..\pcbuild\python pystone.py
Pystone(1.1) time for 10000 passes = 1.25153
This machine benchmarks at 7990.25 pystones/second

This is utterly consistent, BTW:  the *first* time I run pystone after a
reboot, it scores 50% higher than it does on the 2nd or subsequent runs (and
it doesn't matter which Python I use -- 1.5.2 is the same as 2.2b1 in this
respect).  I can regain the original behavior without a reboot only by
forcing the OS to page everything except the kernel to disk before running
Python again -- *that's* intuitive <wink>.

luckily-that's-unique-to-win9x-...-i-think-ly y'rs  - tim





More information about the Python-list mailing list