title: Checking for existence in std::map - count vs find
body: <p>So there seem to be two generally acceptable methods of determining whether or not a key exists in a <code>std::map</code>:</p>
  <pre><code>map.find(key) != map.end()
  map.count(key) &gt; 0
  </code></pre>
  <p>Is one more efficient than the other? Specifically, the concept of <code>count()</code> could be interpreted to mean that the method will iterate over every key, tallying a total count (and because of the definition of <code>std::map</code>, that total count will always be 0 or 1). Is <code>count()</code> guaranteed to &quot;stop&quot; after a match, operating at the same complexity as a <code>find()</code>?</p>