Bugs or inconsistencies between Bash versions discovered along making this library.
You can test the examples with the script bash.sh in the repository that runs docker with a specific Bash version. You can pass the script to it by using here document with a quoted delimiter, so not to care about quotes.
$ ./bash.sh 4.2 -x <<'EOF'
The script to test.
EOF
Calling a function with a lot of arguments is slow¶
When optimizing L_argparse I noticed a particular slowdown - the function was really short, but still profiling showed it is very slow. Turns out the act of calling the function with a lot of arguments is very slow.
Refactoring to using a global array brought significant speedup.
Bash>=4.2<=5.1 removes empty elements from an array after # array expansion¶