dired-hacks
dired-hacks copied to clipboard
refactor(dired-collapse): avoid using function 'length' on lists
This PR will improve efficiency on directories with many files, in two locations, from O(n) to O(1). This is because Lisp needs to traverse "true" lists in order to determine their lengths. emacs-lisp "cheats" in that many of its data structures are really vectors/arrays instead of "true" lisp lists, but not in the cases subject to this PR, IIUC.