bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: array size vs index of last element (was Re: setarray[unsetkey] does


From: Robert Elz
Subject: Re: array size vs index of last element (was Re: setarray[unsetkey] doesn't trigger nounset in arithmetic context)
Date: Sun, 28 May 2023 17:06:23 +0700

    Date:        Sun, 28 May 2023 16:05:04 +1000
    From:        Martin D Kealey <martin@kurahaupo.gen.nz>
    Message-ID:  
<CAN_U6MVKT14O_tvTZnZGdyOQQZ_E4UJ-AUHAy+-QO1huVHe7MA@mail.gmail.com>


  | PS: Everyone assumes that "the speed of external executables is the
  | limiting factor", but it turns out that's not true. It's possible to do
  | MUCH worse, just using built-in features:

Of course it is,   In good shell programming, the idea is to determine
what is slow enough that using an external program built for the purpose
will do better (that is, the overhead of starting it isn't so great that
the benefits are lost) compared with when the cost of running an external
program dwarfs the cost of what it does, and having a built-in mechanism
is better.

Simply building everything into the shell, and expecting to to be fast,
is lunacy.

kre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]