map-like function on dict values?

Skip Montanaro skip at pobox.com
Thu Feb 28 22:19:20 EST 2002


    >> which relies on 2.2's new "for k in dict" capability to completely
    >> avoid list creation.

    Carel> Ah a new contestent, double fun, better algoritme better timing
    Carel> (linux too), but the real iter still wins, although by a very
    Carel> slight margin:)

    >> iter 6.69
    >> iteritems 28.36
    >> mapvalue 8.12

    Carel> iter 10.95
    Carel> iteriteritems 10.43
    Carel> iteritems 52.15
    Carel> mapvalue 12.88

Not on my system:

iter 6.73
iteritems 28.71
iteriteritems 7.28
mapvalue 8.19

:-)

I'm using 2.3a0 (aka CVS), and compile with

    -O3 -minline-all-stringops -fomit-frame-pointer

Skip




More information about the Python-list mailing list