Mailinglist Archive: opensuse-factory (602 mails)

< Previous Next >
Re: [opensuse-factory] Can we assume that /bin/sh is bash?


On 11/02/2019 19:51, Martin Wilck wrote:
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.


Looking slightly more broadly if changing #!/bin/sh to something lighter
lead to a 10-20% reduction in build times for some of our slower
building packages, that is something that would interest my team and I
guess should also interest the obs team and anyone who cares about our
infrastructure usage.

--

Simon Lees (Simotek) http://simotek.net

Emergency Update Team keybase.io/simotek
SUSE Linux Adelaide Australia, UTC+10:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B

< Previous Next >
Follow Ups