Complexity of reallocating storage (was users command crap)

Dik T. Winter dik at cwi.nl
Sat Feb 2 12:33:41 AEST 1991


In article <5883:Feb102:05:4991 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
 > In article <21548 at yunexus.YorkU.CA> oz at yunexus.yorku.ca (Ozan Yigit) writes:
 > > To rephrase: ... you are using poor programming techniques. No program
 > > should make multiple passes over a disk file when it could accomplish its
 > > task with a single pass with hardly any effort on the programmer's part.
 > 
 > If you spent a minute putting your priorities into order you'd realize
 > that this is an entirely ridiculous generalization. If two programs are
 > just as fast, just as small, and take just as little programmer (and
 > user) effort, then it simply doesn't matter whether one of them uses
 > more passes than the other.
 > 
Ah, but that is the problem.  Just as fast comes in flavors.  You have CPU
time, real time, IO time and some more.  If one of the programs uses more
passes it is not equally fast IO time wise (unless you are using SSD on
a Cray of course).  (Moreover, a program doing IO might well block another
program that wants to do IO.)
--
dik t. winter, cwi, amsterdam, nederland
dik at cwi.nl



More information about the Comp.lang.c mailing list