Mailinglist Archive: opensuse-factory (602 mails)

< Previous Next >
Re: [opensuse-factory] Can we assume that /bin/sh is bash?
On Fri, 2019-02-08 at 19:07 +0100, Joerg Schilling wrote:
Martin Wilck <mwilck@xxxxxxxx> wrote:

On Fri, 2019-02-08 at 17:35 +0100, Jan Engelhardt wrote:
On Friday 2019-02-08 15:03, Martin Wilck wrote:

For me the question is, what's the benefit?

Off the top of my head and not very scientifically measured,
./configure for kopano.spec completes 15% faster with pbosh.


People who like to run "configure" tests as benchmarks should know
that
there is a need to make sure that sub-shells are called correctly.

You need to call something like:

CONFIG_SHELL=$shell $shell ./configure

Btw the comparison is a bit unfair: "configure", by design, is
written
in the most portable shell dialect possible, forfeiting all chances
for
bash to catch up with optimized builtins.

This is not unfair. If you like to compare, I recommend you to use a
ksh93 from
2008 which is the fastest shell ever and edit "configure" to switch
off the
important related ksh93 builtins. Note that ksh93 from 2008 is nearly
twice as
fast as bash.

Speaking about shell script performance, IMO the only set of scripts
for which this matters in practice is dracut, which would benefit a
LOT from 30% speedup. Unfortunately it was written as a "#! /bin/bash"
script in the first place.

Martin

--
Dr. Martin Wilck <mwilck@xxxxxxxx>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)


--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >