Message149591
A simple test to show the difference.
BEFORE:
$ python3 -mtimeit "def y(n):" " for x in range(n):" " yield x" "sum(y(10))"
100000 loops, best of 3: 3.87 usec per loop
$ python3 -mtimeit "def y(n):" " for x in range(n):" " yield x" "sum(y(1000000))"
10 loops, best of 3: 186 msec per loop
AFTER:
$ ./python -mtimeit "def y(n):" " for x in range(n):" " yield x" "sum(y(10))"
100000 loops, best of 3: 3.81 usec per loop
$ ./python -mtimeit "def y(n):" " for x in range(n):" " yield x" "sum(y(1000000))"
10 loops, best of 3: 168 msec per loop
before after
y(10) usec's 3.87 3.81 - 1.55%
y(1000000) msec's 186 168 - 9.67% |
|
Date |
User |
Action |
Args |
2011-12-16 03:48:33 | ron_adam | set | recipients:
+ ron_adam |
2011-12-16 03:48:33 | ron_adam | set | messageid: <1324007313.02.0.0091384336258.issue13607@psf.upfronthosting.co.za> |
2011-12-16 03:48:32 | ron_adam | link | issue13607 messages |
2011-12-16 03:48:32 | ron_adam | create | |
|