tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mksh import

On Thu, Dec 30, 2010 at 09:28:06AM -0500, Alex Goncharov wrote:
> ,--- You/Thor (Thu, 30 Dec 2010 08:43:16 -0500) ----*
> | Another question is performance.  Some shells are much much faster than
> | others for tasks like system builds.  For example, zsh can actually
> | speed up the build considerably if used to replace our /bin/sh,
> Is there more information on this -- even at the perception-like
> level?  It sounds surprising that spawning mostly (?)  compilation
> processes is comparable, in execution time, to completing the
> nontrivial work of those spawned processes.
> Where does bash fall in terms of performance?

Generlly executing shell functions and loops.
These are VERY slow with bash and the ksh in netbsd's source tree.

netbsd's /bin/sh parses shell constructs to an intermediate tree and
then evaluates the tree - so the text isn't repeatedly parsed.
This might be a slight loss for simple commands (including those
from scripts) but is a massive gain for anything complicated.

If you are tring to measure shell performance you do need to ensure
that nothing has to be exec'ed.


David Laight:

Home | Main Index | Thread Index | Old Index