[issue13607] Move generator specific sections out of ceval.

Meador Inge report at bugs.python.org
Wed Dec 21 03:10:37 CET 2011


Meador Inge <meadori at gmail.com> added the comment:

With the new patch I see no benefits on the same micro-benchmarks you posted (it is even slower for the smaller case) on a quad-core 64-bit F15 box:

BEFORE:

$ ./python -mtimeit "def y(n):" "  for x in range(n):" "    yield  x" "sum(y(10))"
1000000 loops, best of 3: 1.33 usec per loop
$ ./python -mtimeit "def y(n):" "  for x in range(n):" "    yield  x" "sum(y(1000000))"
10 loops, best of 3: 66 msec per loop

AFTER:

$ ./python -mtimeit "def y(n):" "  for x in range(n):" "    yield  x" "sum(y(10))"
1000000 loops, best of 3: 1.45 usec per loop
$ ./python -mtimeit "def y(n):" "  for x in range(n):" "    yield  x" "sum(y(1000000))"
10 loops, best of 3: 65.8 msec per loop

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13607>
_______________________________________


More information about the Python-bugs-list mailing list