I am working with very large files and I am storing a lot of data in a vector. I would like to make this process of copying the data as fast as possible. Since I'm using the STL I don't have to worry about programming the routines to be as a fast and efficient as possible. But I do have a choice:
1. Use vector_name.reserve(length) and then a series of push_backs to fill in the data
--or--
2. Use assign(array_begin_address,array_end_address)--without reserve, since assign would change the point anyway.
I am lucky enough to have been furnished with a very fast computer and have tried both ways and can't tell the difference--time-wise. However, the users of the my software might not be so lucky. If anyone could answer this I'd be very grateful.
-DM
