[Python-ideas] Revised**5 PEP on yield-from

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Mar 2 05:37:24 CET 2009


Jim Jewett wrote:

> how often will there be long chains,

My suspicion is not very often. The timing tests I
did suggest that the biggest benefit will be from
simply removing most of the delegation overhead from
a single level of delegation, and you don't need
any fancy algorithm for that.

My experiments with traversing binary trees suggest
that the delegation overhead isn't all that great
a problem until the tree is about 20 levels deep,
or 1e6 nodes. Even then it doesn't exactly kill you,
but even so, my naive implementation shows a clear
improvement.

-- 
Greg




More information about the Python-ideas mailing list