Difference in assignment between references vs pointers?
===

I am seeing huge performance difference in tight loops when I do the following:

    MyObject& foo = bar.GetObject();

vs

    MyObject* foo = bar.GetObjectPtr();

Where the specifics of the class functions are:

    class MyClass
    {
      MyObject someobject;
      MyObject& GetObject() { return someobject; }
      MyObject* GetObjectPtr() { return &someobject; }
    } bar;


The assignment in the first line is considerably slower than the second.  Can someone explain what is going on?  Does this have something to do with the default copy assignment?

