 <p>There are chances that the first solution is faster.</p> <p>A very nice article :</p> <p><a href="http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/" rel="nofollow">http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/</a></p>