Re: [Python-Dev] Pre-pre PEP for 'super' keyword
May 6, 2007
10:34 p.m.
Steve Holden wrote:
Tim Delaney wrote:
BTW, one of my test cases involves multiple super calls in the same method - there is a *very* large performance improvement by instantiating it once.
And how does speed deteriorate for methods with no uses of super at all (which will, I suspect, be in the majority)?
Zero - in those cases, no super instance is instantiated. There is a small one-time cost when the class is constructed in the reference implementation (due to the need to parse the bytecode to determine if if 'super' is used) but in the final implementation that information will be gathered during compilation. Tim Delaney
6979
Age (days ago)
6979
Last active (days ago)
0 comments
1 participants
participants (1)
-
Delaney, Timothy (Tim)