On Tuesday 23 of March 2010, Guido Berhoerster wrote:
* Stephan Kulow <coolo(a)suse.de> [2010-03-23
> Am Dienstag 23 März 2010 schrieb Guido Berhoerster:
> > * Michael Matz <matz(a)suse.de> [2010-03-23 14:49]:
> > > I repeatedly hear this claim, seldom to be followed up by credible
> > > numbers. And of course: when does it actually matter, even if some
> > > other shell was faster? (I already can feel the answer being "but
> > > booting will be so much faster then", which is wrong).
> > Well the "claim" acutally comes from the bash maintaines, read
> > bash(1) BUGS. One example is startup time, try libmicro's system
> > benchmark
> > /usr/lib/libMicro/bin/system -E -C 200 -L -S -W -N "system" -I
> > with /bin/sh as a link to ksh or dash and empty .profile/ENV.
> > dash is 2,5 times and ksh93 is still 1,5 times faster. I have
> > anecdotal evidence that pattern matching while processing
> > textfiles is significantly slower in bash compared to ksh93/dash.
Speaking of anecdotes, there is one I remember from the times of the
communist regime about plans set up by the party: "Our farm has completed the
5-year plan at 200%. We have four chickens instead of two."
Another area in which bash is bad at and which matters
are subshells, for a rough estimate try
time $shell -c 'i=0; while [ $i -lt 10000 ]; do $(a=$$); i=$((i+1)); done'
with bash, dash, and ksh93. Here dash is 3 times faster and ksh93
37 times faster than bash (ksh93 shines here because it does not
actually use a subprocess).
Let me give you a piece of advice: If you want to argue by technical
arguments, then do so. "37 times faster", without anything else, is
like "hair 87% more shiny" ads. If better performance should be a reason to
avoid bashism, then say how big improvements you actually expect, and provide
some real numbers to support that. "37 times faster" is completely
unimpressive if it in practice may mean that this change will save quarter of
a second of boot time.
openSUSE Boosters team, KDE developer
l.lunak(a)suse.cz , l.lunak(a)kde.org
To unsubscribe, e-mail: opensuse-packaging+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-packaging+help(a)opensuse.org