Yes there is:
"If Perl made a system call for every read operation, that would be 10,001 system calls in all (one extra to detect end-of-file), and if the file was on the disk, it would have to wait for the disk at least 10,000 times. That would be very slow."
Can you write a better OS? | [reply] |
Oh, dear me. I assumed that you would know that stdout is line-buffered when it is going to a tty, and block-buffered when it isn't. The block-buffering is useful, it really speeds up pipes. The line-buffering is pretty much just a gotcha for newbies. Why do you want to speed up console output? It's just going to go scrolling by too fast for you to read.
| [reply] |