dunno atm what else to optimize
i had , in my thoughts , the case
a var has much content
and then code says var=$var or ${var<opts>}
i was hoping bash wouldnt re-set long data , .. cpu : faster less load
i havent benchmarked , yet
On Sun, Nov 3, 2024, 09:16 Andreas Kähäri <andreas.kahari@abc.se> wrote:
> On Sun, Nov 03, 2024 at 01:29:02AM +0100, #!microsuxx wrote:
> > is a
> >
> > var=${var:-blabla}
> >
> > optimized away to no exec at all
> > if var is not empty
> > ?
> >
> > also same for = := -
>
> There is already no exec involved in the expansion of the parameter.
>
> What do you expect to gain from optimizing this away, compared to
> optimizing something else? Compared to actually executing an external
> command, the time spent on this is negligible.
>
> --
> Andreas (Kusalananda) Kähäri
> Uppsala, Sweden
>
> .
>