title: map vs unordered_map for few elements
body: <p>I am trying to choose between <code>map</code> and <code>unordered_map</code> for the following use case:</p>
  
  <p>The key of the <code>map</code> is a pointer.
  The most common use case is that there will be a single element in the map.
  In general, the max number of elements in the map less than 10.
  The map is accessed very often and speed is the most important factor.  Changes to the map are infrequent.</p>
  
  <p>While measuring the speed is obviously the correct approach here, this code will be used on several platforms so I'm trying to create a general rule of thumb for choosing between a <code>map</code> and <code>unordered_map</code> based on number of elements.  I've seen some posts here that hint that std::map may be faster for a small number elements, but no definition of "small" was given.</p>
  
  <p>Is there a rule of thumb for when to choose between a <code>map</code> and <code>unordered_map</code> based on number of elements?  Is another data structure (such as linear search through a <code>vector</code>) even better?</p>