title: Efficient use of std::map and std::set in c++
body: <p>To use vector efficiently we need to reserve the memory before setting the elements. But for map and set which are not contiguous containers how we can make them fast and efficient?</p>
  
  <hr>
  
  <p>I have a vector/set/map of size 10s Millions of doubles and want to add non-repeated elements. I want to make it as fast as possible.</p>