P
parag
For the a given hierarchy
class A{
virtual bool isUselessFunc() = 0;
};
class B : public A {
bool isUselessFunc() {
return true;
}
};
class C : public B
{
bool OtherFunc() {
return false;
}
};
Today if we have a pointer to a Object of Class C , ( in a pointer of
A )
C * c = new C ():
A* a = c;
I need to acces c->isUselessFunc() many times in a code , I see that
in the collect report , it is one of the top most used functions.
Is there any way we could reduce this footprint, but having all the
class deriving from Class B have their own non virtual version ???
class A{
virtual bool isUselessFunc() = 0;
};
class B : public A {
bool isUselessFunc() {
return true;
}
};
class C : public B
{
bool OtherFunc() {
return false;
}
};
Today if we have a pointer to a Object of Class C , ( in a pointer of
A )
C * c = new C ():
A* a = c;
I need to acces c->isUselessFunc() many times in a code , I see that
in the collect report , it is one of the top most used functions.
Is there any way we could reduce this footprint, but having all the
class deriving from Class B have their own non virtual version ???