Q:

Difference in accessing member function via pointer of parent type or directly from derived class

Consider three classes A, B, and C, where A is the parent of B and C with a function A::doThing().  
Is there any difference between the following two methods of calling doThing() in terms of performance (assuming B and C don't override doThing()?
B b1;
C c1;
A* a1 = &b1;
A* a2 = &c1;

//Option 1:
b1.doThing();
c1.doThing();

//Option 2:
a1->doThing();
a2->doThing();

In a tutorial app I saw they claimed that the second option was faster.  I understand that if B or C overrides doThing(), then the two different calls could have different results, but I don't get why the second way of calling the function would be faster? The direct quote (in the example they use option 2):

We would have achieved the same result by calling the functions directly on the objects.  However, it's faster and more efficient to use pointers.

Edit:  Code from app as some have suggested I misunderstood: 
#include <iostream>
using namespace std;

class Enemy {
    protected: 
        int attackPower;
    public:
        void setAttackPower(int a){
            attackPower = a;
        }
};

class Ninja: public Enemy {
    public:
        void attack() {
            cout << "Ninja! - "<<attackPower<<endl;
        }
};

class Monster: public Enemy {
    public:
        void attack() {
            cout << "Monster! - "<<attackPower<<endl;
        }
};

int main() {
    Ninja n;
    Monster m;
    Enemy *e1 = &n;
    Enemy *e2 = &m;

    e1->setAttackPower(20);
    e2->setAttackPower(80);

    n.attack();
    m.attack();
}

A:

If doThing is not virtual, it's all the same, as in all cases the exact method to call is resolved at compile time. 
Otherwise:

calling directly on the object should be always as fast as it gets, since the compiler is sure of the a actual type of the object, so there's no extra indirection step (no vtable lookup, possible inlining);
when calling through pointer to base class, it's down to the ability of the compiler to prove the dynamic type of the object (or realizing that the method is never overridden); it everything is local to the function this may be easy, but otherwise it quickly gets difficult (for the compiler is not even trivial to understand that nobody is redefining a virtual method, because - barring LTCG and similar mechanisms - it has no knowledge of what happens in other translation units). 

We would have achieved the same result by calling the functions directly on the objects. However, it's faster and more efficient to use pointers.

If the context is as you reported, this is complete bullshit. Throw away whatever guide where found this, the author has no idea of what he is talking about.

