4 ms·
It is not that stderr is faster, it is that it is unbuffered by default (while stdout is buffered by default). If you flush your output after printing to stdout
by m45t3r 7y ago
It is not that stderr is faster, it is that it is unbuffered by default (while stdout is buffered by default). If you flush your output after printing to stdout, you should get a similar result.
And well, I am thinking you're talking about "much faster" for small amount of text (small enough to not fill the stdout buffer). Actually printing huge amount of text to stdout should be much faster than printing to stderr exactly because of this buffer.