Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site amdahl.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!mcnc!decvax!decwrl!sun!amdahl!mat From: mat@amdahl.UUCP (Mike Taylor) Newsgroups: net.unix-wizards Subject: Re: Relative speed of Bourne vs. C Shells - C Shell is faster. Message-ID: <1339@amdahl.UUCP> Date: Thu, 28-Mar-85 15:59:09 EST Article-I.D.: amdahl.1339 Posted: Thu Mar 28 15:59:09 1985 Date-Received: Mon, 1-Apr-85 03:17:13 EST References: <216@sdcc12.UUCP> <12138@watmath.UUCP> Organization: Amdahl Corp, Sunnyvale CA Lines: 27 > I'm surprised at the comments that the Bourne Shell is faster than the > C Shell. The 4.2bsd Bourne Shell has to call a program to add two > numbers together, print a message, or perform an IF statment -- the C > Shell does all that using built-in code. Waterloo has some large shell > scripts that would not be practical if written in Bourne format. > > I don't like the C Shell bugs, but when I can work around them the C > Shell gives me much faster performance for my large shell scripts. > KSH recognized the cost of calling programs to do simple things (such > as add or compare numbers), and moved all that code into the shell > itself. Perhaps other Bourne Shells have done this, but be sure that > your version does before you claim it is faster than the C Shell. > ---- shell scripts ---- To add some more results for the given shell scripts (in seconds), Shell -Amdahl 470 V/8- ----Vax11/780--- UTS/V (SVR2) 4.2 bsd User System Total User System Total csh 1.21 0.38 1.59 11 4 15 sh 0.96 1.76 2.72 25 138 163 ksh 0.91 2.05 2.96 -- -- -- -- Mike Taylor ...!{ihnp4,hplabs,amd,sun}!amdahl!mat [ This may not reflect my opinion, let alone anyone else's. ]