title: How true is "Want Speed? Pass by value"
body: <p>Correct me if I'm wrong. Say I have:</p>
  
  <pre><code>struct X
  {
      std::string mem_name;
  
      X(std::string name)
          : mem_name(std::move(name)) 
      {}
      ...
  };
  struct Y
  {
      std::string mem_name;
  
      Y(const std::string &amp;name)
          : mem_name(name) 
      {}
      ...
  };
  </code></pre>
  
  <p>In <code>X</code>'s ctor, <code>name</code> is obviously a copy of whatever argument got passed to <code>X</code>, <code>X</code> invokes the move ctor of <code>std::string</code> to initialize <code>mem_name</code>, right? </p>
  
  <p>Let's call that a <em>copy-then-move on X*</em>; two operations: <strong>COPY, MOVE</strong>.</p>
  
  <p>In <code>Y</code>'s ctor, <code>name</code> is a const ref, which means there's no actual copy of the element because we're dealing directly with the argument passed from wherever <code>Y</code>'s object needs to be created. But then we copied <code>name</code> to initialise <code>mem_name</code> in <code>Y</code>; one operation: <strong>COPY</strong>. Surely it should therefore be a lot faster (and preferable to me)?</p>
  
  <p>In Scott Meyer's GN13 talk (around time-frame 8:10 and 8:56), he talks about <strong>"Want speed? Pass by value"</strong> and I was wondering is there any performance difference or loss in passing arguments (or strings to be precise) by reference and passing by value "in order to gain speed?" </p>
  
  <p>I'm aware of the fact that passing arguments by value can be expensive, especially when dealing with large data. </p>
  
  <p>Maybe (clearly?) there's something I'm missing from his talk?</p>