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!sjl From: sjl@amdahl.UUCP (Steve Langdon) Newsgroups: net.unix-wizards Subject: Re: Relative speed of Bourne vs. C Shells - Korn is faster. Message-ID: <1341@amdahl.UUCP> Date: Thu, 28-Mar-85 17:57:24 EST Article-I.D.: amdahl.1341 Posted: Thu Mar 28 17:57:24 1985 Date-Received: Mon, 1-Apr-85 03:17:30 EST References: <216@sdcc12.UUCP> <12138@watmath.UUCP> <1339@amdahl.UUCP> Organization: Amdahl Corp, Sunnyvale CA Lines: 25 Rewriting the script to use ksh integer arithmetic (see below) adds the following times. > 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 -- -- -- new ksh 0.16 0.05 0.21 -- -- -- #!/bin/ksh integer x=1 while (( $x < 100 )); do ((x = $x + 1)) if (( $x > 10 )); then echo Hi! $x fi done -- Stephen J. Langdon ...!{ihnp4,hplabs,sun,nsc}!amdahl!sjl [ The article above is not an official statement from any organization in the known universe. ]