Subject: Re: ksh bugs and behaviour questions
To: None <>
From: Matthias Buelow <>
List: tech-userlevel
Date: 01/26/2003 01:28:58
Roland Dowdeswell wrote:

> /bin/sh is invoked during a typical build?  How about when running
> autoconf?  Etc, etc.

And in what way would speeding up forking in sh by as much as 10% make 
the compiler run faster?  Autoconf's sloth comes from compiling lots of 
little programs and gcc is certainly not a fast compiler.  On my VAX for 
example, the difference between running an external command on sh or ksh 
(or bash for that matter) is not noticable.  However, starting gcc to 
compile one of the little autoconf test programs typically takes about 
10-20 seconds.  Other programs that are typically called from sh scripts 
like sed, awk etc. are also in that ballpark at least, if they do some 
nontrivial processing.  It simply doesn't matter if the spawning of an 
external command itself is a slight fraction faster.  It certainly 
doesn't justify modifying working programs.

[Besides, it's ksh the performance of which was found to be lagging 
behind sh, and ksh is not normally used for such scripts anyways.  But 
if you're using ksh instead of sh, then you could easily just write ksh 
scripts, which can use many more builtins and language features and make 
calls to some external commands often unnecessary and hence the entire 
scripts significantly faster.]

Matthias Buelow