Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add benchmark for displaying all programs in PATH
Summary: This is the first regression we've seen for `fd` vs. `find`. ```sh $ PATH="/opt/homebrew/Cellar/findutils/4.10.0/libexec/gnubin/:$PATH" ./warm-cache-exe-paths.sh Benchmark 1: FIND_PROG=find FIND_ARGS='-maxdepth 1 -executable -type f,l -printf %f\n' get_programs_in_path Time (mean ± σ): 142.0 ms ± 6.0 ms [User: 32.7 ms, System: 72.0 ms] Range (min … max): 129.7 ms … 154.6 ms 20 runs Benchmark 2: FIND_PROG='fd .' FIND_ARGS='--hidden --max-depth=1 --type=executable --follow --format {/} ' get_programs_in_path Time (mean ± σ): 272.1 ms ± 6.0 ms [User: 88.8 ms, System: 142.1 ms] Range (min … max): 258.2 ms … 279.9 ms 10 runs Summary FIND_PROG=find FIND_ARGS='-maxdepth 1 -executable -type f,l -printf %f\n' get_programs_in_path ran 1.92 ± 0.09 times faster than FIND_PROG='fd .' FIND_ARGS='--hidden --max-depth=1 --type=executable --follow --format {/} ' get_programs_in_path Both fd and find found the same 2943 results ```
- Loading branch information