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?
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.