Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: selecting columns from a tab-separated-values file

by sundialsvc4 (Abbot)
on Jan 22, 2013 at 22:05 UTC ( #1014802=note: print w/replies, xml ) Need Help??

in reply to selecting columns from a tab-separated-values file

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.

  • Comment on Re: selecting columns from a tab-separated-values file

Replies are listed 'Best First'.
Re^2: selecting columns from a tab-separated-values file
by ibm1620 (Monk) on Jan 22, 2013 at 22:32 UTC
    I probably should have mentioned this before: my Perl program was consuming 100% of one CPU core, leading me to think it was unlikely to be I/O-bound.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014802]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2020-10-01 13:18 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (13 votes). Check out past polls.