title: Performance cost of comparing two C++ iterators
body: <p>In general, what is the performance cost of an equality comparison between two STL container iterators?  I'm only talking about defined operations; that is, comparing two iterators referring to the same object.</p>
  
  <p>My specific use-case is that I have a <code>std::map</code> that could potentially have very large elements, lots of elements, or both.  If an equality comparison between two iterators over such a map have hidden penalties that I'm not aware of, it could impact the performance of my code.</p>