Hi, I have a program which produces a vector of integers (several million entries). I need to write that into a human-readable string of space separated numbers. I wonder, what would be the fastest way? My first attempt was stringstream resultStream; copy(integers.begin(), integers.end(), ostream_iterator<int>(resultStream, " ")); string result = resultStream.str(); But that requires copying the string. Thus I was wondering if I could use boost to write to the target string directly? boost::iostreams allow me to do the following: string result; boost::iostreams::filtering_ostream out(boost::iostreams::back_inserter(result)); copy(integers.begin(), integers.end(), ostream_iterator<uint64>(out, " ")); This is faster by almost a factor of 2. Any ideas how to increase speed even more? Thanks in advance, Roland