Citing Does setbuf() affect cout?Does setbuf() affect cout?
I want to increase the buffer size to improve the performance of cout (it is usually redirected to disk)
Can I do:
std::cout.rdbuf()->pubsetbuf(some_buffer, buffer_size);
And also
ios::sync_with_stdio(false);
Does this make sense?
EDIT: Also I am using multiple threads, so I was hoping to reduce the need for synchronization.