title: QMap::contains() VS QMap::find()
body: <p>I often see code like:</p>
  
  <pre><code>if(myQMap.contains("my key")){
      myValue = myQMap["my key"];
  }
  </code></pre>
  
  <p>which theoretically performs two look-up's in the QMap. </p>
  
  <p>My first reaction is that it should be replaced by the following, which performs one lookup only and should be two times faster:</p>
  
  <pre><code>auto it = myQMap.find("my key");
  if(it != myQMap.end()){
      myValue = it.value();
  }
  </code></pre>
  
  <p>I am wondering if QMap does this optimization automatically for me? 
  In other words, I am wondering if QMap saves the position of the last element found with <code>QMap::contains()</code> and checks it first before performing the next lookup?</p>