How optimized is inheritance? (C++)
Posted: Sun Jul 01, 2007 11:27 am
I know virtual functions add overhead, but for the highest level of an inheritance tree, will it add any overhead?
like would
like would
Code: Select all
class base{
virtual bah();
};
class up1: base{
virtual bah();
};
class up2: base{
virtual bah();
};
void main(base* low, up1* up){
low->bah(); //I know this will produce overhead
up->bah(); //but will this!?
}