On Thu, Jun 8, 2023, 21:09 alex xmb ratchev <fxmb...@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. >> >> I hope to get your help. > >