title: C++11 - move semantics is slow on construction
body: <p>this code</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  struct obj
  {
    std::string name;
    int age;
    float money;
  
    obj():name("NO_NAME"),age(0),money(0.0f){}
    obj(const std::string&amp; _name, const int&amp; _age, const float&amp; _money):name(_name),age(_age),money(_money){}
  
    obj(obj&amp;&amp; tmp): name(tmp.name), age(tmp.age), money(tmp.money) {}
    obj&amp; operator=(obj&amp;&amp;) {return *this;}
  
  };
  
  int main(int argc, char* argv[])
  {
    std::vector&lt;obj&gt; v;
    for( int i = 0; i &lt; 5000000; ++i )
    {
      v.emplace_back(obj("Jon", 45, 500.6f));
    }
    return(0);
  }
  </code></pre>
  
  <p>is about 2 time slower than the equivalent with <code>v.push_back(obj("Jon", 45, 500.6f));</code> and I don't get why.</p>
  
  <p>I have tested this with bot <code>g++ 4.7.2</code> and <code>clang++ 3.3</code>.</p>
  
  <p>Where I'm wrong ?</p>
  
  <hr>
  
  <p>now that i have corrected my move construnctor i will add more</p>
  
  <p><a href="http://ideone.com/78McfY" rel="nofollow">this is a push_back version</a></p>
  
  <p><a href="http://ideone.com/XA10so" rel="nofollow">this is the emplace_back version</a></p>
  
  <p>I'm testing this 2 with the <code>time</code> utility under Linux and compiling them with</p>
  
  <pre><code>g++-4.7 -std=c++11 -s -O3 -DNDEBUG
  </code></pre>
  
  <p>or</p>
  
  <pre><code>clang++ -std=c++11 -s -O3 -DNDEBUG
  </code></pre>