Python 2.6 beta 1 and 3.0 beta 1 were both released Wednesday. This gave me the urge to run a quick speed comparison on all the versions of Python installed on my Linux box.
The program in question is my solution to Project Euler problem 100. (Source code not provided, because that would be a spoiler.)
$ time python2.4 euler100.py > /dev/null
$ time python2.5 euler100.py > /dev/null
$ time python2.6 euler100.py > /dev/null
$ time python3.0 euler100.py > /dev/null
$ time pypy-c euler100.py > /dev/null
debug: WARNING: library path not found, using compiled-in sys.path
$ time jython euler100.py > /dev/null
Traceback (innermost last):
File "euler100.py", line 58, in ?
File "euler100.py", line 49, in main
OverflowError: float too large to convert
Executive summary: Python 2.4 through 2.6 are all about the same speed, for this test. 3.0 is about twice as slow. PyPy is four times as slow. And Jython is way slow and blows up converting big numbers.
Of course, this is just one data point. I should scale this test up to run all my Project Euler solutions that don't rely on external libraries. (It would probably take significant work to get libraries like gmpy to work with 3.0 or PyPy.)