bug-bash
[Top][All Lists]
Advanced

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

Re: Performance difference between different versions of bash


From: alex xmb ratchev
Subject: Re: Performance difference between different versions of bash
Date: Thu, 8 Jun 2023 21:45:28 +0200

On Thu, Jun 8, 2023, 21:09 alex xmb ratchev <fxmbsw7@gmail.com> wrote:

>
>
> On Thu, Jun 8, 2023, 14:16 wang yuhang via Bug reports for the GNU Bourne
> Again SHell <bug-bash@gnu.org> wrote:
>
>> Hi
>
>
> hi , i made some optional benchmark code
> it .. doesnt make much sense cause i too lately read / understood about
> the time echo `date` part
>
> i originally when i tried there were weird bugs
> also one where a probably specific alias ( the C one ) if it was C=$' it
> errored , cmd not found , as the cmd in eval in c()
> then when C=' it worked
> .. now that bug also disappeared ( both works .. just in printf the
> current code is for ' , in $' in \\n \n instead \\n ..
>
> .. nm ..
>

ehm short about the script , time operation after loop or big export slow
afterwards ( like at end ) time date / printf %T is normal fast again

the code s about benchmarking
> eg not wanting exec seq or date
>
> on aarch64 termux android foun , bash 5.2.15
> i cant paste anything in this crapmail ( app )
>
>
> I found that there is a huge difference in performance between different
>> versions of bash when there are a large number of environment variables in
>> my system.
>>
>>
>> The steps to reproduce are as follows:
>> $ for i in `seq 10000`; do export TEST_ENV_$i=$i; done
>> $ time echo `date`
>>
>>
>> In bash-4.3, it only takes 0.002 seconds, but in bash-5.2, it takes up to
>> 0.5 seconds.
>>
>>
>> I want to know if this is due to certain features in the higher version
>> of bash or due to some hidden bugs.&nbsp;
>>
>> I hope to get your help.
>
>


reply via email to

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