
Feb. 20, 2009
1:48 a.m.
Antoine Pitrou wrote:
However, if there isn't a specialized optimization in the interpreter, it will also probably be slower (because it switches between frames a lot
That's true, but I'm 99.9% sure that if it's implemented at all then it will be implemented fairly efficiently, because doing so is actually easier than implementing it inefficiently.:-)
(my opinion on your PEP being that it brings the complication inside the interpreter itself, especially if you want to implement the feature in an optimized way.
Bringing it into the interpreter is what makes it possible, and fairly straightforward, to implement it efficiently. Hopefully this will become clearer when I get a reference implementation going. -- Greg