Author ron_adam
Recipients ron_adam
Date 2011-12-16.03:48:32
SpamBayes Score 0.00135808
Marked as misclassified No
Message-id <1324007313.02.0.0091384336258.issue13607@psf.upfronthosting.co.za>
In-reply-to
Content
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%
History
Date User Action Args
2011-12-16 03:48:33ron_adamsetrecipients: + ron_adam
2011-12-16 03:48:33ron_adamsetmessageid: <1324007313.02.0.0091384336258.issue13607@psf.upfronthosting.co.za>
2011-12-16 03:48:32ron_adamlinkissue13607 messages
2011-12-16 03:48:32ron_adamcreate