Xref: utzoo comp.unix.shell:2492 comp.benchmarks:701 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!munnari.oz.au!uniwa!DIALix!metapro!bernie From: bernie@metapro.DIALix.oz.au (Bernd Felsche) Newsgroups: comp.unix.shell,comp.benchmarks Subject: Re: Shell performance (sh, ksh, & csh). Keywords: sh ksh csh performance Message-ID: <1991Jun22.081817.8125@metapro.DIALix.oz.au> Date: 22 Jun 91 08:18:17 GMT References: <1991Jun20.213755.21433@riacs.edu> Organization: MetaPro Systems, Perth, Western Australia Lines: 32 In <1991Jun20.213755.21433@riacs.edu> dwsmith@loki.arc.NASA.GOV (David Smith) writes: >"In spite of its increased size, ksh provides better performance. Programs >can be written to run faster with ksh than with either Bourne shell or the C >shell, sometimes an order of magnitude faster." >Does anyone have some good examples of this statement? I know doing arithmetic >now in the ksh is much better because it is builtin, but what about in general? In general, ksh is slower starting, but faster executing. If you have shell scripts with only one non-builtin command, then the Bourne shell will very probably run it faster and more efficiently. If your machine is tight on memory, then the Korn shell is more likely to have part of it paged out under heavy load, slowing it down in comparison to the smaller Bourne shell. Murphy's Law of memory management states that the next page needed by a process is to be paged out to make room for another EMACS :-) The Korn shell, when used properly, can run a lot faster as it has more builtins. Careful programming in the Bourne shell can achieve almost the same result. Applying the same practices to the Korn shell does not generally achieve the same spectacular performance improvements. Shell performance is IMHO a function of the programmer. -- Bernd Felsche, _--_|\ #include Metapro Systems, / sold \ Fax: +61 9 472 3337 328 Albany Highway, \_.--._/ Phone: +61 9 362 9355 Victoria Park, Western Australia v Email: bernie@metapro.DIALix.oz.au