psyco, jython, and python speed tests

Skip Montanaro skip at pobox.com
Fri Mar 15 17:46:44 EST 2002


    Skip> How did you "psycoize pystone"?

    Sandy> Basically, I took the pystone included in Armin's psyco cvs
    Sandy> distribution and simplified the main() function to get rid of the
    Sandy> comparitive stuff.

Modification of the source to pystone is a no-no, otherwise you're comparing
apples and oranges.  Instead, try something like

    >>> import pystone
    >>> pystone.main()
    Pystone(1.1) time for 10000 passes = 2.51
    This machine benchmarks at 3984.06 pystones/second
    >>> pystone.main()
    Pystone(1.1) time for 10000 passes = 2.54
    This machine benchmarks at 3937.01 pystones/second
    >>> pystone.main()
    Pystone(1.1) time for 10000 passes = 2.53
    This machine benchmarks at 3952.57 pystones/second
    >>> import psyco
    >>> pystone.Proc0 = psyco.proxy(pystone.Proc0)
    >>> pystone.Proc1 = psyco.proxy(pystone.Proc1)
    >>> pystone.Proc8 = psyco.proxy(pystone.Proc8)
    >>> pystone.main()
    Pystone(1.1) time for 10000 passes = 0.58
    This machine benchmarks at 17241.4 pystones/second
    >>> pystone.main()
    Pystone(1.1) time for 10000 passes = 0.57
    This machine benchmarks at 17543.9 pystones/second
    >>> pystone.main()
    Pystone(1.1) time for 10000 passes = 0.58
    This machine benchmarks at 17241.4 pystones/second

Skip




More information about the Python-list mailing list