Roland Mainz wrote:
>
>
> Mhhh... but there are cases where running a shell (with builtins) is
> cheaper.
> For example (just a simplified example, I know that this is not
> perfect):
> -- snip --
> clobber:
>       rm b/a.x
>       rm b/b.x
>       rm b/c.x
>       rm b/d.x
>       rm b/z.x
>         rmdir b
> -- snip --
> |fork()|s six children (five "rm" and one "rmdir").
>
> Assuming "rm" and "rmdir" are builtin commands in the current shell the
> following would be faster:
> -- snip --
> clobber:
>       rm b/a.x ; \
>       rm b/b.x ; \
>       rm b/c.x ; \
>       rm b/d.x ; \
>       rm b/z.x ; \
>         rmdir b
> -- snip --
> ... in this case only the shell gets started once and then executes six
> builtin commands.
>   

For cases like this, I would suggest that the better solution is to have
a builtin for _make_.  Otherwise the problem of trying to figure out
which is faster ... use ksh with builtins or avoid the spawn of ksh in
the middle, becomes "challenging" to generalize.

>
>
> ----
>
> Bye,
> Roland
>
>   

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to