Python code written in 1998, how to improve/change it?
Wolfgang Keller
wolfgang.keller.nospam at gmx.de
Wed Jan 25 07:43:44 EST 2006
> what makes you think that resuming a generator won't involve function
> calls ?
That was not what I wrote.
I referred to what Peter Hansen <peter at engcorp.com> wrote in
mailman.821.1137730663.27775.python-list at python.org:
> I believe the more modern approach to this is to use generators in some
> way, yield each other as the next state. This way you avoid all almost
> all the function call overhead (the part that takes significant time,
> which is setting up the stack frame)
The way I understand this, resuming a generator causes less overhead than the
inital overhead of a function call.
Again, I'm just a poor scripting dilettant who's asking questions.
Sincerely,
Wolfgang Keller
More information about the Python-list
mailing list