title: Is using string.length() in loop efficient?
body: <p>For example, assuming a <code>string s</code> is this:    </p>
  
  <pre><code>for(int x = 0; x &lt; s.length(); x++)
  </code></pre>
  
  <p>better than this?:</p>
  
  <pre><code>int length = s.length();
  for(int x = 0; x &lt; length; x++)
  </code></pre>
  
  <p>Thanks,
  Joel</p>