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


Groups > gnu.bash.bug > #14982

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

From "G. Branden Robinson" <g.branden.robinson@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Should [[ -v 1 ]] be supported?
Date 2018-12-27 20:57 -0500
Message-ID <mailman.6433.1545962563.1284.bug-bash@gnu.org> (permalink)
References (1 earlier) <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>

Show all headers | 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