[Pythonmac-SIG] Pystone numbers for different Macs...

skip at pobox.com skip at pobox.com
Mon Jan 21 14:35:00 CET 2008


    Daniel> ... the benchmark wasn't written to take advantage of multi-core
    Daniel> machines--silly me I thought any good benchmark would be. 

A little bit of pystone history.  Python's pystone benchmark is a
translation of the Dhrystone benchmark, which was originally written in Ada
in the mid 80s, then translated to C.  I'm pretty sure Guido used the C
version as the basis for pystone.  There is no multithreading in Dhrystone,
so it's understandable that pystone is thread-free as well.

One value of a benchmark is its stability over time.  Since its addition to
Python in 1995 it has had just two bug fixes to the implementation.  You
could certainly fork pystone to create a version that did use multiple
threads, but you'd have to call it something else, pystone-t perhaps.  It
would be a different benchmark.

The only other changes of note to the benchmark are due to the speed of
modern CPUs.  The number of passes of the algorithm to run by default has
grown over the years as processor speeds have increased.  When first
included in Python in 1995 it ran 1000 passes of the main loop.  Today it
defaults to 50,000 to get reasonable runtimes on modern CPUs.  Even so, on
most current 2-3 GHz CPUs it will run in about a second, so it's probably
time to increase the number of passes again.

More detail about the Dhrystone benchmark, including a floating point
predecessor, the Whetstone benchmark, and a couple versions of the C source
you can build and run, are on Wikipedia:

    http://en.wikipedia.org/wiki/Dhrystone

For the history of the pystone benchmark, UTSL:

    http://svn.python.org/view/python/trunk/Lib/test/pystone.py

Skip


More information about the Pythonmac-SIG mailing list