Relative speed of Bourne vs. C Shells - C Shell is faster.

Doug Gwyn <gwyn> gwyn at brl-tgr.ARPA
Fri Mar 29 07:10:05 AEST 1985


> ... Here are two shell
> scripts (made to make tail act like head) go ahead, run em, make my day..

I took the Tiberio challenge and the Bourne shell script was slightly
faster than the Cshell script, but not much.

There are really two good reasons for using the Bourne/Korn shell
for scripts:
	(1)  The shell is available on every post-Sixth Edition UNIX.
	(2)  It has a formal grammar.
The usual arguments:
	(3)  It is faster.
	(4)  It is more readable.
aren't nearly as important.

I think the real question is, why doesn't AT&T further upgrade the
Bourne shell a la Korn so that there is nothing that the Cshell has
left to offer.  The major functional differences so far have been:
	(a)  History.  Still not in Bourne shell but okay in Korn.
	(b)  Job control.  Added to Bourne shell at BRL, also in Korn.
	(c)  Aliases.  Pretty much remedied by SVR2 shell functions.
	(d)  Lots of speed hacks.  Now in Bourne shell also.



More information about the Comp.unix.wizards mailing list