I would footnote the previous discussion with BrowserUK by making one other important point ...
While it’s easy to assume that a file-I/O request by a userland program corresponds 1-to-1 with a disk I/O operation, in fact it does not. The request might be satisfied directly through a pre-read buffer. If I/O does occur, it might involve the reading of multiple directory or file-allocation structures in order to locate the point where the data may be found. Further, many operating systems provide various means by which it is possible to “cue” the operating system that this particular program will be making sequential reads ... or, the OS might discover such things for itself.
All of these things are centered around the notion that a computer program ought to be able to just be the simplest expression of what it has been built to do. If it is “reading from one stream and writing to another,” then ... so be it. Why, indeed, should a program have to “put more thought into” such a simple requirement?
In short ... maybe my entire previously-argued point is specious, if not wrong. Maybe the operating system does know best. Maybe it’s best that it does.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||