Do deep inheritance trees degrade efficiency?

Terry Reedy tjreedy at udel.edu
Thu Mar 19 05:11:19 EDT 2009


Anthra Norell wrote:
> Would anyone who knows the inner workings volunteer to clarify whether 
> or not every additional derivation of a class hierarchy adds an 
> indirection to the base class's method calls and attribute read-writes. 

More potential search layers rather than pointer indirection.  But I 
doubt this is a bottleneck in very many programs.  So I would more 
concern myself first with quickly writing correct code.

tjr




More information about the Python-list mailing list