title: C++ - Performance of vector of pointer to objects, vs performance of objects
body: <p>In this case the question scenario is a game, so all resources are allocated at the beginning then iterated over for a level.</p>
  
  <p>The objects being stored in the vector are instances of complex classes, and of course the actual copying them into the vector at load-time is time-consuming, but of low-concern.</p>
  
  <p>But if my main concern is the speed of iteration over the class objects at runtime, would I be better to store the class objects themselves in the vector, rather than just pointers to the class objects as is traditionally recommended?</p>
  
  <p>I am not worried about memory management in this example, only speed of iteration.</p>