void stream_fill_string(std::ifstream *stream, std::string &output)
{
std::ios::pos_type size = stream_size(stream);
output.resize(size);
stream->read(&output[0], size);
}
Will read a lot faster.
Look here:
http://groups.google.com/group/perfo/browse_thread/thread/1ecf38b7d7ea7d38
Why is C++ ifstream so slow in VS.NET 2008
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement