I have a large vector (10^9 elements) of chars, and I was wondering what is the fastest way to write such vector to a file. So far I\'ve been using next code:
Use the write method on it, it is in ram after all and you have contigous memory.. Fastest, while looking for flexibility later? Lose the built-in buffering, hint sequential i/o, lose the hidden things of iterator/utility, avoid streambuf when you can but do get dirty with boost::asio ..