void func()
{
A* a = new A();
a->foo();
A z;
z.foo();
}
Assuming foo is not virtual and ignoring allocator overhead, why might z.foo() be faster than a->foo?
You should be able to solve this
{
A* a = new A();
a->foo();
A z;
z.foo();
}
Assuming foo is not virtual and ignoring allocator overhead, why might z.foo() be faster than a->foo?
You should be able to solve this