# HG changeset patch # User Franz Glasner # Date 1729960685 -7200 # Node ID 7d44112dfb817c91f065600d5f46968db909e2c8 # Parent 11f3101c19805242b3b6c999ab6c6a8612fac85e farray.sh: Use plain insertion sort by default now instead of dumpsort and use Shell sort for array with length > 8 diff -r 11f3101c1980 -r 7d44112dfb81 share/local-bsdtools/farray.sh --- a/share/local-bsdtools/farray.sh Sat Oct 26 18:35:37 2024 +0200 +++ b/share/local-bsdtools/farray.sh Sat Oct 26 18:38:05 2024 +0200 @@ -1627,8 +1627,12 @@ _farr_array_get_meta "$@" - # XXX TBD: Select a method depenting on `__farr_len`. - _farr_array_insertionsort + if [ "${__farr_len}" -le 8 ]; then + + _farr_array_insertionsort + else + _farr_array_shellsort + fi }