bug-bash
[Top][All Lists]
Advanced

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

Performance difference between different versions of bash


From: wang yuhang
Subject: Performance difference between different versions of bash
Date: Thu, 8 Jun 2023 20:15:29 +0800

Hi


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.

reply via email to

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