[Python-Dev] Simple generators, round 2

Christian Tismer tismer@tismer.com
Mon, 19 Mar 2001 18:25:43 +0100


Neil Schemenauer wrote:
> 
> [Neil]
> > One unexpected benefit: with PyEval_EvalFrame split out of
> > eval_code2 the interpreter is 5% faster on my machine.  I
> > suspect the compiler has an easier time optimizing the loop in
> > the smaller function.
> 
> [Christian]
> > Really!? I thought you told about a speed loss?
> 
> You must be referring to an earlier post I made.  That was purely
> speculation.  I didn't time things until the weekend.  Also, the
> 5% speedup is base on the refactoring of eval_code2 with the
> added generator bits.  I wouldn't put much weight on the apparent
> speedup either.  Its probably slower on other platforms.

Nevermind. I believe this is going to be the best possible
efficient implementation of generators.
And I'm very confident that it will make it into the
core with ease and without the need for a PEP.

congrats - chris

-- 
Christian Tismer             :^)   <mailto:tismer@tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net/
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     where do you want to jump today?   http://www.stackless.com/