Testing the new version of Psyco

Discussion in 'Python' started by Baz Walter, Apr 8, 2009.

  1. Baz Walter

    Baz Walter Guest

    hello

    i recently tried out this new version of psyco...

    http://www.voidspace.org.uk/python/weblog/arch_d7_2009_03_14.shtml#e1063

    ....because of the new support for generators. the above link says "To
    use and test generators, create preferences.py, following the
    instructions in setup.py" - except there's nothing obvious in setup.py
    that refers to generators.

    anyway, i created a preferences.py file (with PSYCO_DEBUG = 1) and ran
    psycobench against python-2.5/psyco-1.6 and python-2.6/psyco-2.0 with
    the following results (output has been cropped slightly):

    # start output

    [benchmark]$ python2.5 psycobench.py -m time_generators time_anyall
    Running new timings with original psyco

    send call loop 1000 plain: 3.30 psyco: 3.29 ratio: 1.00
    send and loop 1000 plain: 3.28 psyco: 3.27 ratio: 1.00
    send just many times plain: 1.28 psyco: 0.56 ratio: 2.29 *
    iterate just many times plain: 0.67 psyco: 0.57 ratio: 1.19 *
    call next just many times plain: 0.85 psyco: 0.63 ratio: 1.35 *
    all_bool_genexp plain: 2.03 psyco: 2.31 ratio: 0.88
    all_bool_listcomp plain: 2.94 psyco: 1.01 ratio: 2.91
    all_genexp plain: 1.71 psyco: 1.97 ratio: 0.87
    all_listcomp plain: 2.70 psyco: 0.73 ratio: 3.71
    all_loop plain: 1.09 psyco: 0.08 ratio: 13.15
    any_bool_genexp plain: 2.03 psyco: 2.45 ratio: 0.83
    any_bool_listcomp plain: 2.89 psyco: 0.97 ratio: 2.99
    any_genexp plain: 1.74 psyco: 1.84 ratio: 0.95
    any_listcomp plain: 2.65 psyco: 0.72 ratio: 3.69
    any_loop plain: 1.08 psyco: 0.08 ratio: 13.10

    [benchmark]$ python2.6 psycobench.py -m time_generators time_anyall
    Running new timings with python2.6/site-packages/psyco/_psyco.so

    send call loop 1000 plain: 2.85 psyco: 0.04 ratio: 67.90
    send and loop 1000 plain: 2.85 psyco: 0.04 ratio: 65.00
    send just many times plain: 1.17 psyco: 0.87 ratio: 1.35
    iterate just many times plain: 0.64 psyco: 0.86 ratio: 0.74
    call next just many times plain: 0.77 psyco: 0.87 ratio: 0.89
    all_bool_genexp plain: 1.87 psyco: 1.98 ratio: 0.95
    all_bool_listcomp plain: 2.54 psyco: 0.66 ratio: 3.84
    all_genexp plain: 1.69 psyco: 1.77 ratio: 0.95
    all_listcomp plain: 2.38 psyco: 0.52 ratio: 4.55
    all_loop plain: 1.07 psyco: 0.08 ratio: 14.24
    any_bool_genexp plain: 1.87 psyco: 1.99 ratio: 0.94
    any_bool_listcomp plain: 2.57 psyco: 0.68 ratio: 3.76
    any_genexp plain: 1.74 psyco: 1.82 ratio: 0.95
    any_listcomp plain: 2.47 psyco: 0.53 ratio: 4.66
    any_loop plain: 1.07 psyco: 0.07 ratio: 14.65

    # end output

    with the obvious exception of the the first two tests for psyco v2, the
    results (for generators) seem a little underwhelming. in fact, psyco v1
    does significantly better on three of the tests (marked with an
    asterisk) and for the others there's not much difference.

    this makes me wonder whether i enabled generators properly in psyco v2
    when i compiled it. has anybody else tried out this new version of psyco
    and got better overall results for generators? also, those first two
    results for v2 look really odd - what could explain the huge difference
    relative to the other generator tests for v2?

    (p.s. i re-ran the tests and got very similar results)

    --
    Baz Walter
     
    Baz Walter, Apr 8, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KefX

    Need Psyco profiling help...

    KefX, Oct 25, 2003, in forum: Python
    Replies:
    7
    Views:
    338
  2. Ingo Blank

    psyco + expat SEGVs

    Ingo Blank, Dec 13, 2003, in forum: Python
    Replies:
    1
    Views:
    318
    Andrew MacIntyre
    Dec 15, 2003
  3. V Green
    Replies:
    0
    Views:
    885
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    1,000
    PA Bear [MS MVP]
    Feb 5, 2008
  5. MowGreen [MVP]
    Replies:
    5
    Views:
    2,042
    PA Bear [MS MVP]
    Feb 9, 2008
Loading...

Share This Page