J
JackC
Hi,
If i have a vector<char> maybe 15mb in size, whats the most efficient
way to write out all the elements to an output file?
I have tried this:
for(int z = 0; z < Output_Buffer.size(); z++)
{
write(ostr, (char *) Output_Buffer[z], 1);
}
But with 15mb in the buffer, that takes a good 30 seconds to write
out , any ideas on how i can speed it up? If i could use a
vector<string> i would do, but my preceding code processes lots of
individual chars so i just ended up adding them to a vector<char> and
now need a fast way to output the buffer.
Thanks for any help.
Jack
If i have a vector<char> maybe 15mb in size, whats the most efficient
way to write out all the elements to an output file?
I have tried this:
for(int z = 0; z < Output_Buffer.size(); z++)
{
write(ostr, (char *) Output_Buffer[z], 1);
}
But with 15mb in the buffer, that takes a good 30 seconds to write
out , any ideas on how i can speed it up? If i could use a
vector<string> i would do, but my preceding code processes lots of
individual chars so i just ended up adding them to a vector<char> and
now need a fast way to output the buffer.
Thanks for any help.
Jack