title: When is an object sufficiently large that there is a performance gain in passing it by reference instead of by value?
body: <p>As answered in this <a href="https://stackoverflow.com/questions/2627166/difference-between-const-reference-and-normal-parameter">question</a> by Charles Bailey pass by constant reference should be considered when the object type is large but what kind of object is considered large?</p>
  
  <p><strong>EDIT:</strong>
  OK for providing more data that could be used to provide a more concrete answer I decided to add a real world problem to this description.</p>
  
  <p>Suppose we have an object like this:</p>
  
  <pre><code>typedef struct dipl {
      quint16 __id;
      quint16 __pos;
      quint16 __len;
  } data;
  </code></pre>
  
  <p>And we have another object like this:</p>
  
  <pre><code>class bidipl
  {
  public:
      bidipl();
      quint8 id();
      void setid(quint8 __id);
      void appenddipl(dipl __dipl);
  private:
      qint8 _M_id;
      dipllist _M_dipllist;
  };
  </code></pre>
  
  <p>Where <code>dipllist</code> is <code>typedef QList&lt;dipl&gt; dipllist;</code>. Objects <code>dipl</code> and <code>bidipl</code> are created once but accessed over maybe 100 times a minute. So how should we pass <code>dipl</code> to our append function?</p>
  
  <pre><code>void appenddipl(dipl __dipl);
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>void appenddipl(const dipl&amp; __dipl);
  </code></pre>