[Python-3000] [Python-Dev] Pre-pre PEP for 'super' keyword (original) (raw)
Delaney, Timothy (Tim) tdelaney at avaya.com
Mon May 7 00:34:52 CEST 2007
- Previous message: [Python-3000] Dealing with timestamp issues for rebuiling AST using Parser/asdl_c.py
- Next message: [Python-3000] PEP: Eliminate __del__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-3000] Dealing with timestamp issues for rebuiling AST using Parser/asdl_c.py
- Next message: [Python-3000] PEP: Eliminate __del__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]