[Python-Dev] Simple generators, round 2

Neil Schemenauer nas@arctrix.com
Mon, 19 Mar 2001 09:21:59 -0800


[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.

  Neil