why pass by reference better?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/270408/is-it-better-in-c-to-pass-by-value-or-pass-by-constant-reference">Is it better in C++ to pass by value or pass by constant reference?</a>  </p>
</blockquote>



<p>see these 2 program.</p>

<pre><code>bool isShorter(const string s1, const string s2);

int main()
{
    string s1 = "abc";
    string s2 = "abcd";
    cout &lt;&lt; isShorter(s1,s2); 
}

bool isShorter(const string s1, const string s2)
{
    return s1.size() &lt; s2.size();
}
</code></pre>

<p>and</p>

<pre><code>bool isShorter(const string &amp;s1, const string &amp;s2);

int main()
{
    string s1 = "abc";
    string s2 = "abcd";
    cout &lt;&lt; isShorter(s1,s2); 
}

bool isShorter(const string &amp;s1, const string &amp;s2)
{
    return s1.size() &lt; s2.size();
}
</code></pre>

<p>Why second one is better?</p>
