Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14982

Re: Should [[ -v 1 ]] be supported?

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From "G. Branden Robinson" <g.branden.robinson@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Should [[ -v 1 ]] be supported?
Date Thu, 27 Dec 2018 20:57:12 -0500
Lines 71
Approved bug-bash@gnu.org
Message-ID <mailman.6433.1545962563.1284.bug-bash@gnu.org> (permalink)
References <CABrM6wmrn2gi8_HgmRg67B5nsgGNFRn8Bn-r20MvC-_2LJHZ0g@mail.gmail.com> <5dac2cf2-2fac-0fd1-058f-6a84a3271738@case.edu> <abd86dbc-f6e2-62bd-e9dc-f959e2dbff9f@inlv.org> <CABrM6wkGwVbPdrXTetVsFCiwDPg5JnK4KRh49WqACsKhrrMMdA@mail.gmail.com> <20181228013623.mersdxbzy64dpldp@crack.deadbeast.net> <CABrM6w=2zrjmV24VAgzioAu2iNcyuf3tsi--cfvkCH6MJ7feRA@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pa7hslbzkwlxcyjg"
X-Trace usenet.stanford.edu 1545962563 13654 208.118.235.17 (28 Dec 2018 02:02:43 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=U2BFx+WZ+kFOXxdzJgC3jmBZw9fl5SYGtOEaym0JQug=; b=pCRXc6LTAneH5cF143ppBWyu0IaX/zRRXuSyJ0GqYmy+AfH2c6hz+/SXhLwA8MJj4/ j4NAFUkk+iEvH/L2n4osTJZ3q6YfeHyGJtZ2b03Clpjm7d1ybDoWM/yhpfLV74g40Wuj eC0we3z3op60+mLFy7MGyQ5P9ttLAxkJKFH/iPQnhp1SY+lHZFVqXyoq0Qit++V346zF Q/P4ZB1fHf7xfxUr0uxB0/Lfuzg2bEXpvYb0osxcte+2qVYt6TYLEx0drUWCNI4VcbPc bgvVt6pKnZLSDR/nAU9hlm/7JCkAQjeI2H7z3pCGyKlwHUJjlWRk4VcESNa6ARE9RGX3 ml5A==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=U2BFx+WZ+kFOXxdzJgC3jmBZw9fl5SYGtOEaym0JQug=; b=T3TulqyPaommeCHIV5+J+QzHvJkbvoBfjmSDV1cOZ6VuZNEgtzgBFPnWVul6MV/4v/ vcSA4KEgx5lBXucF5tl2gkxOv9gXazDeWzAY0oaq++cto4GzZiMCge6fHa020ZKZZ6Rv 6TDkIIB6ASnbRw2FzUpcFtja41c/Nd1qKndLDcdj2M85TBrJrhACH/PzVHhxAtn9+mZx Rk+4mcdkhYFLFAHit5GFEbHGOL0bXrP8ap64aI57TaFQ2FamNH3HtKPcJYwl/lsN30Rd V/7OSGmhzi/BTO779Ge87wYi80nYPPu0wNJKDJI47owkpr67yX9LpGUyXKzGvUGgPOEH 3KyQ==
X-Gm-Message-State AA+aEWaC+0oesTLA0rXl2e7f7HZJoq0Any7fk0Z4mhaWIRZcQZrVpdV5 N86BoLP1RjHe5U4fVsHwNhFLVj3ofjs=
X-Google-Smtp-Source AFSGD/XDzt/8d3bmoVAXoKb01Qw6FdFctRbTv4baHU76rdCfRQrlq6GWZQdw6tHZHfLdSrTi4sj+ag==
X-Received by 2002:a81:7342:: with SMTP id o63mr26950764ywc.131.1545962236654; Thu, 27 Dec 2018 17:57:16 -0800 (PST)
Content-Disposition inline
In-Reply-To <CABrM6w=2zrjmV24VAgzioAu2iNcyuf3tsi--cfvkCH6MJ7feRA@mail.gmail.com>
User-Agent NeoMutt/20180716
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2607:f8b0:4864:20::c32
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.21
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash/>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:14982

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

At 2018-12-27T19:47:08-0600, Peng Yu wrote:
> On Thu, Dec 27, 2018 at 7:37 PM G. Branden Robinson
> > As others have noted, if you are worried about marginal performance
> > impacts this small, margin you are probably writing in the wrong
> > language, or distracting yourself with tiny details when you do not even
> > know the cyclomatic complexity of your code or the big-O classification
> > of your algorithms.
> >
> > Attack those problems first, and see what you discover.
> 
> The problem is that bash is not systematically profiled for
> performance at all. I am doing it step it by step.

You're whacking moles.  Use a profiler.  That's what they're for.

https://www.thegeekstuff.com/2012/08/gprof-tutorial/

> There are many more that I have already tested. You can not dismiss
> this one just because it may not have a large impact.

Yes, I can.  You need to identify where bash is _actually_ spending most
of its execution time, and a profiler can help you do that.

You also need to establish acceptance criteria.  All but the most
finely-tuned code can be made more performant; often raw performance
comes at a cost, such as the abandonment of memory safety.  Aliasing
problems are one example in software, and the Spectre and Meltdown
suites of cache-related timing attacks are an examples from hardware.

What is it you're trying to achieve?  State your goal in terms that are
"SMART":

(S)pecific
(M)easurable
(A)ttainable
(R)easonable
(T)imely

Just the first four would be a good start.

Regards,
Branden

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Should [[ -v 1 ]] be supported? "G. Branden Robinson" <g.branden.robinson@gmail.com> - 2018-12-27 20:57 -0500

csiph-web