help-bash
[Top][All Lists]
Advanced

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

Re: The difference between `X=x f | cat` and `{ X=x; f; } | cat`


From: Peng Yu
Subject: Re: The difference between `X=x f | cat` and `{ X=x; f; } | cat`
Date: Fri, 20 Jan 2023 19:25:15 -0600

Yes. But that is not my point. I use a long var name so that I can
make the time difference between `X=x f | true` and `{ X=x; f; } |
true` reproducible. Otherwise, I don't even know whether the time
difference that I see is just random noise or is a real difference.

On 1/20/23, Kerin Millar <kfm@plushkava.net> wrote:
> On Fri, 20 Jan 2023 17:25:10 -0600
> Peng Yu <pengyu.ut@gmail.com> wrote:
>
>> I made a program to check for even longer variable name lengths. It
>> seems that when the variable length is really long, there is a
>> significant and reproducible difference. So then it seems that `{ X=x;
>
> You are not the only one to have noticed.
>
> https://github.com/izabera/shellnotes/blob/031d6edcc0e76e76af77d54a56b0f1cfc9f30d1d/bash#L9
>
> I have never attempted to find out why, partly because I have come to expect
> for bash to be slow in just about all respects.
>
> --
> Kerin Millar
>


-- 
Regards,
Peng



reply via email to

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