The following example uses more peak RAM on new bash versions than old versions:
for i in {1..1000000}; do
echo "${i}" >> example.txt
done
By measuring peak memory usage with time (/usr/bin/time -f "%E %P %M"),
I get that newer versions of Bash use about 284M, where older versions
use about 191M.
Is this perceived increase in memory usage worth looking more into or is
it intended?
I tried to bisect but I'm not sure the result is useful. I got the following:
d233b485e83c3a784b803fb894280773f16f2deb is the first bad commit
commit d233b485e83c3a784b803fb894280773f16f2deb
Author: Chet Ramey <[email protected]>
Date: Mon Jan 7 09:27:52 2019 -0500
bash-5.0 distribution sources and documentation
Thank you to Chet and to everyone for their time working on Bash!
Scott