Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 exptools; site whuxl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!mike From: mike@whuxl.UUCP (BALDWIN) Newsgroups: net.unix-wizards Subject: Re: Relative speed of Bourne vs. C Shells - C Shell is faster. Message-ID: <557@whuxl.UUCP> Date: Wed, 27-Mar-85 22:58:33 EST Article-I.D.: whuxl.557 Posted: Wed Mar 27 22:58:33 1985 Date-Received: Thu, 28-Mar-85 06:31:39 EST References: <216@sdcc12.UUCP> <12138@watmath.UUCP> <1778@seismo.UUCP> Organization: /usr/exptools/lib/netnews/myorg Lines: 35 > I too am sick and tired of hearing about how much faster the bourne shell > is than the C shell. On a heavily loaded VAX my C shell scripts always run > faster, and when the load drops to around 1 the two shells seem to run neck > and neck. Some people say bourne shell is easier to program, come on, does > "if test $# -gt 1" really look better than "if ($#argv > 1)" and tell me you > don't cringe every time you type esac and fi (yuk yuk). Here are two shell > scripts (made to make tail act like head) go ahead, run em, make my day.. > ---seismo!tiberio OK, I did run 'em. Ten times, on twenty files each time. The results of the time command are: total sh: real 3.3 2.9 2.9 2.9 2.9 2.9 2.9 2.9 2.9 3.0 29.5 user 0.7 0.8 0.8 0.7 0.7 0.7 0.7 0.7 0.7 0.8 7.3 sys 2.1 1.9 2.0 2.1 2.0 2.0 2.0 2.0 2.1 2.0 20.2 csh: real 8.4 5.9 5.9 7.8 5.9 5.9 5.9 6.1 6.0 5.9 63.7 user 2.9 2.9 2.8 2.8 2.9 2.9 2.8 2.9 2.8 2.8 28.5 sys 3.0 2.8 2.9 2.9 2.9 2.9 2.9 2.9 2.9 3.0 29.1 Relative speed comparison: sh/csh real 46.3% user 25.6% sys 69.4% This is with the SVR2 sh, by the way. I'm not sick and tired of people making false claims (people always will), I'm just amused. Michael Baldwin whuxl!mike