title: Alternative to vectors for large data sets? C++
body: <p>I am looking for a data structure that holds data in order that its inserted (like a vector) that needs to hold millions of unsigned longs. The key is that it needs to have a lookup thats better than O(logn), because it will get searched against a similar vector of the same size. Is there something that exists like this?</p>
  
  <p>If I insert 10, 20, 30 and then iterate over the set, I need to guarantee the order of 10, 20, 30. My data is a string I converted into a unsigned long to reduce memory use, that is reverse decodable.</p>
  
  <p>EDIT:
  Since people are asking, I am comparing two vectors against each other (both very large in size) to get the difference.</p>
  
  <p>Small Example:</p>
  
  <pre><code>vector 1: 10 20 30 40 50 60
  
  vector 2: 11 24 30 40 55 70 90
  
  result:   30 40
  </code></pre>