Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.bin/pathchk

On Wed, Nov 10, 2010 at 01:34:44PM +0200, Alan Barrett wrote:
> "-exec ... +" and "xargs" will both accumulate many args into each
> invocation of the child program, and will both fork the same number of
> times.  The version using xargs is actually less efficient, because
> there's one extra fork to run "xargs" itself, and there's extra I/O over
> the pipeline.

Modulo the fact that the xargs version might run faster because of the
asynchronous pipe that allows find's directory IO to overlap
the executed commands.
(It might run slower due to disk head thrashing.)


David Laight:

Home | Main Index | Thread Index | Old Index