title: Unordered map vs vector
body: <p>I'm building a little 2d game engine. Now I need to store the prototypes of the game objects (all type of informations). A container that will have at most I guess few thousand elements all with unique key and no elements will be deleted or added after a first load. The key value is a string.</p>
  
  <p>Various threads will run, and I need to send to everyone a key(or index) and with that access other information(like a texture for the render process or sound for the mixer process) available only to those threads. </p>
  
  <p>Normally I use vectors because they are way faster to accessing a known element. But I see that unordered map also usually have a constant speed if I use the <code>::at</code> element access. It would make the code much cleaner and also easier to maintain because I will deal with much more understandable man made strings.</p>
  
  <p>So the question is, the difference in speed between a access to a <code>vector[n]</code> compared to a <code>unorderedmap.at("string")</code> is negligible compared to his benefits? </p>
  
  <p>From what I understand accessing various maps in different part of the program, with different threads running just with a "name" for me is a big deal and the speed difference isn't that great. But I'm too inexperienced to be sure of this. Although I found informations about it seem I can't really understand if I'm right or wrong.</p>
  
  <p>Thank you for your time.</p>