Passing by Value und Kopieroptimierung

Ich bin auf den Artikel gestoßenhttp://cpp-next.com/archive/2009/08/want-speed-pass-by-value/

Hinweis des Autors:

Kopieren Sie Ihre Funktionsargumente nicht. Übergeben Sie sie stattdessen als Wert und lassen Sie den Compiler das Kopieren durchführen.

Ich verstehe jedoch nicht ganz, welche Vorteile sich aus den beiden im Artikel dargestellten Beispielen ergeben:

//Don't
    T& T::operator=(T const& x) // x is a reference to the source
    { 
        T tmp(x);          // copy construction of tmp does the hard work
        swap(*this, tmp);  // trade our resources for tmp's
        return *this;      // our (old) resources get destroyed with tmp 
    }

vs

// DO
    T& operator=(T x)    // x is a copy of the source; hard work already done
    {
        swap(*this, x);  // trade our resources for x's
        return *this;    // our (old) resources get destroyed with x
    }

In beiden Fällen wird eine zusätzliche Variable erstellt. Wo liegen also die Vorteile? Der einzige Vorteil, den ich sehe, ist, wenn das temporäre Objekt an das zweite Beispiel übergeben wird.

Antworten auf die Frage(1)

Ihre Antwort auf die Frage