Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!dcdwest!ittvax!decvax!genrad!panda!talcott!harvard!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.unix-wizards Subject: Re: Relative speed of Bourne vs. C Shells - C Shell is faster. Message-ID: <9552@brl-tgr.ARPA> Date: Thu, 28-Mar-85 15:54:46 EST Article-I.D.: brl-tgr.9552 Posted: Thu Mar 28 15:54:46 1985 Date-Received: Tue, 2-Apr-85 00:14:54 EST References: <216@sdcc12.UUCP> <12138@watmath.UUCP> Organization: Ballistic Research Lab Lines: 19 > On our VAX/780 running 4.2bsd, the Bourne script uses 25 seconds user CPU > and 138 seconds system CPU. The C Shell script uses 11 seconds user CPU > and 4 seconds system CPU. The Bourne script has to fork four processes > for each loop iteration; the C Shell none. ?? I found the following: CSH script SH script 7.2 user 6.2 user 2.1 system 10.9 system Of course, the extra "system" time is because you had the Bourne shell execing "expr" in a loop, since it does not have arithmetic built in. (The Korn shell does..) In spite of this severely biased comparison, the Bourne shell did not do badly; indeed the shell itself was quicker. Our Cshell is essentially 4.2+BSD and the Bourne shell is SVR2 under the BRL UNIX System V emulation. Maybe you need a better Bourne shell?