title: Alternative for std::set without memory reallocation?
body: <p>In an application i generate a lot of subproblems exhaustively and solve them using "std::set" operations. For this I need to "<em>insert</em>" and "<em>find</em>" elements and also "<em>iterate</em>" over the sorted list.</p>
  
  <p>The problem is that for each of the millions of subproblems the "std::set" implementation allocates new memory each time I insert an element in the set which makes the whole application very slow:</p>
  
  <pre><code>{   // allocate a non-value node
      _Nodeptr _Pnode = this-&gt;_Getal().allocate(1); // &lt;- bottleneck of the program
  </code></pre>
  
  <p>Is there some stl-structure that allows me to to the above operations in "O(log(n))" while not reallocating any memory?</p>