Home Computers Python Python Benchmark
Python Benchmark PDF Print E-mail
Written by Gordon Tillman   
Thursday, 04 December 2008 19:24

There is a cool benchmark built into Python. Here is an example:

>>> import test.pystone
>>> test.pystone.main()
Pystone(1.1) time for 50000 passes = 0.51
This machine benchmarks at 98039.2 pystones/second

Or you can call the method directly and get a tuple output:

>>> import test.pystone
>>> test.pystone.pystones()
(0.53000000000000003, 94339.622641509428)
Last Updated on Thursday, 04 December 2008 19:44