Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 1995 11:31:56 -0700 (PDT)
From:      "Rodney W. Grimes" <rgrimes@GndRsh.aac.dev.com>
To:        wosch@cs.tu-berlin.de (Wolfram Schneider)
Cc:        simonm@dcs.gla.ac.uk, wollman@lcs.mit.edu, current@freebsd.org
Subject:   Re: from(1)
Message-ID:  <199509221831.LAA00551@GndRsh.aac.dev.com>
In-Reply-To: <199509221313.PAA25411@caramba.cs.tu-berlin.de> from "Wolfram Schneider" at Sep 22, 95 03:13:25 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Simon Marlow writes:
> >I disagree entirely.  The generality provided by pipes and pipe
> >combinators far outweighs the slight performance gain by implementing
> >the options directly.  How many other programs are you going to add
> >'-c' to?  What about the programs where '-c' is already taken, and you
> >have to use an inconsistent flag?
> 
> grep have already '-c'. I add -c to locate. It is a real difference
> between 13MB I/O or 115MB.

grep should not have the -c option.  

> 
> >A valid point, but this is a shell problem and not worth sacrificing
> >the philosophy of an operating system for.
> 
> ^philosophy^religion

Go read some of the old Bell labs papers and rethink that, unix does have
a philosophy, and this point is one of them!  Small simple programs that
act as filters and are strung togeather with pipes and shell scripts was
the very thing that Unix was when it was designed.  Too bad so many folks
have lost sight of the elegance that really is :-(.

> Do you want remove 'z' flag from tar because 
> 
> $ tar cfvz - files ... > x.tgz break old unix philosophy?

Yes, because it gives me no control over the level of gzip compression
or other gzip glags when you do it that way.  IMHO, and I am on record
with this in some of the freebsd lists long ago, way way way too many
options have proliferated through out the source.  tar having a z option
is defanitly one of them!

Programs that have options in them that cause there input or output to
be filtered by execing another program are brain dead.  You either have
to add all the options of the other program or you have to suffer from
inflexibility :-(.

I think the basic reasoning of these ``optimizations'' is to make things
faster, well, attack the more general problem so that ALL things can
be faster, fix pipe I/O bandwidth :-).

SkyRsh# dd if=/dev/zero bs=8192 count=1024 | dd of=/dev/null
1024+0 records in
1024+0 records out
8388608 bytes transferred in 3 secs (2796202 bytes/sec)
SkyRsh# dd if=/dev/zero bs=8192 count=1024 >/dev/null
1024+0 records in
1024+0 records out
8388608 bytes transferred in 1 secs (8388608 bytes/sec)

Pipes are slow :-(.

-- 
Rod Grimes                                      rgrimes@gndrsh.aac.dev.com
Accurate Automation Company                 Reliable computers for FreeBSD



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509221831.LAA00551>