Email Focus

Mike Touloumtzis miket@bluemug.com
Mon Dec 10 21:27:01 2001


On Mon, Dec 10, 2001 at 03:11:09PM -0500, Frank Tobin wrote:
> Mike Touloumtzis, at 11:51 -0800 on 2001-12-10, wrote:
> 
> > Seriously, there are lots of microoptimizations you could make to the Unix
> > command line.  'ls' would be faster if it were integrated into the shell.
> > The question is: are people willing to give up cleanliness for speed?  I
> > don't think most tree walking operations are performance critical.
> 
> An O(n) factor is not a 'microoptimazation'.

Whether an optimization is O(n) or O(whatever) has nothing to do with
whether it's a microoptimization.

If it speeds up a 3 hour process by 1 second, it's a microoptimization.
If it speeds up a command line invocation by 1 millisecond, it's a
microoptimization.

You could speed up drawing in Linux by moving X into the kernel.  This
gives you an O(n) speedup, where n is 'number of drawing primitives'.
Yet you still won't be able to convince people it's a good idea.

> > I _do_ think gnupg should be able to encrypt multiple files in one
> > invocation, which it doesn't seem to be able to do now.  That way, if you
> > want to amortize startup time for a tree walk which really is performace
> > critical, you can pipe find's output to 'xargs -n <large number> gpg'.
> 
> This isn't clean either.  Iterators have been designed for a reason:  the
> entire tree can be very big.  And you may very well likely exceed your
> system's max argument length.

???

Both of these problems are exactly what xargs -n is designed to solve.

miket