title: Performance Lack in my C++ Code
body: <p>At the moment i'm trying to optimize my c++ code to get better performance, because I have a strong java/c# background.
  I've tested simple examples like getter/setter between classes and realized using them with references like this:</p>
  
  <pre><code>vector&lt;string&gt;&amp; MyClass::getNum()
  {
     return num;
  }
  
  void MyClass::setNum(vector&lt;string&gt; &amp;num)
  {
     this-&gt;num = num;
  }
  </code></pre>
  
  <p>(let say 15+ Strings are in the Vector)</p>
  
  <p>is faster 2x faster than without. (no difference when using simple/small parameter, but huge diff. when using Vectors etc.)</p>
  
  <p>I also tried the same example in Java, but somehow my Java code is still faster than in C++.
  Someone can help me?</p>