generators : random shootout

Mark McEahern marklists at mceahern.com
Fri Jan 11 14:04:20 EST 2002


Oops, after tweaking the timing a bit, they seem to take the same amount of
time:

    # using globals
    $ gen.py 1000
    8.163294467
    0.010000 seconds.

    # using generators
    $ gen2.py 1000
    8.163294467
    0.010000 seconds.

// mark





More information about the Python-list mailing list