Skip to content

Instantly share code, notes, and snippets.

@tavianator
Created December 18, 2023 22:28
Show Gist options
  • Save tavianator/32edbe052f33ef60570cf5456b59de81 to your computer and use it in GitHub Desktop.
Save tavianator/32edbe052f33ef60570cf5456b59de81 to your computer and use it in GitHub Desktop.
fd 9 benchmarks

Complete traversal

linux v6.5 (86,380 files)

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -u '^$' bench/corpus/linux 151.0 ± 37.0 133.8 230.4 6.20 ± 1.63
fd-9.0.0 -u '^$' bench/corpus/linux 24.4 ± 2.3 19.5 27.4 1.00

rust 1.72.1 (192,714 files)

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -u '^$' bench/corpus/rust 285.5 ± 43.8 256.8 354.8 8.33 ± 1.49
fd-9.0.0 -u '^$' bench/corpus/rust 34.3 ± 3.1 29.6 40.1 1.00

chromium 119.0.6036.2 (2,119,292 files)

Command Mean [s] Min [s] Max [s] Relative
fd-8.7.1 -u '^$' bench/corpus/chromium 2.537 ± 0.052 2.482 2.593 13.85 ± 0.36
fd-9.0.0 -u '^$' bench/corpus/chromium 0.183 ± 0.003 0.179 0.189 1.00

Early termination

chromium 119.0.6036.2 (depth 24)

Depth 2

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -usg1 $(shuf -n1 $FILES) bench/corpus/chromium 216.0 ± 62.9 130.0 297.5 7.34 ± 7.74
fd-9.0.0 -usg1 $(shuf -n1 $FILES) bench/corpus/chromium 29.4 ± 29.8 7.3 102.7 1.00

Depth 4

Command Mean [s] Min [s] Max [s] Relative
fd-8.7.1 -usg1 $(shuf -n1 $FILES) bench/corpus/chromium 1.732 ± 1.229 0.137 3.160 44.50 ± 40.07
fd-9.0.0 -usg1 $(shuf -n1 $FILES) bench/corpus/chromium 0.039 ± 0.022 0.012 0.098 1.00

Depth 8

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -usg1 $(shuf -n1 $FILES) bench/corpus/chromium 553.6 ± 258.9 340.9 1187.7 6.16 ± 4.08
fd-9.0.0 -usg1 $(shuf -n1 $FILES) bench/corpus/chromium 89.8 ± 42.0 20.2 178.5 1.00

Depth 16

Command Mean [s] Min [s] Max [s] Relative
fd-8.7.1 -usg1 $(shuf -n1 $FILES) bench/corpus/chromium 2.250 ± 0.469 1.740 3.203 26.99 ± 16.80
fd-9.0.0 -usg1 $(shuf -n1 $FILES) bench/corpus/chromium 0.083 ± 0.049 0.026 0.177 1.00

Printing paths

Without colors

linux v6.5

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -u --search-path bench/corpus/linux 158.3 ± 42.8 132.9 230.4 5.84 ± 1.62
fd-9.0.0 -u --search-path bench/corpus/linux 27.1 ± 1.7 23.4 30.6 1.00

With colors

linux v6.5

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -u --search-path bench/corpus/linux --color=always 158.6 ± 41.8 134.1 230.6 3.06 ± 0.81
fd-9.0.0 -u --search-path bench/corpus/linux --color=always 51.9 ± 1.8 49.1 55.8 1.00

Parallelism

rust 1.72.1

-j1

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -j1 -u '^$' bench/corpus/rust 264.0 ± 0.4 263.4 264.8 1.00
fd-9.0.0 -j1 -u '^$' bench/corpus/rust 266.7 ± 0.7 265.7 268.6 1.01 ± 0.00

-j2

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -j2 -u '^$' bench/corpus/rust 218.6 ± 3.3 209.2 221.8 1.47 ± 0.02
fd-9.0.0 -j2 -u '^$' bench/corpus/rust 148.4 ± 1.1 146.9 151.7 1.00

-j3

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -j3 -u '^$' bench/corpus/rust 213.1 ± 3.9 206.4 218.2 2.02 ± 0.05
fd-9.0.0 -j3 -u '^$' bench/corpus/rust 105.6 ± 1.6 102.3 108.6 1.00

-j4

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -j4 -u '^$' bench/corpus/rust 219.9 ± 7.5 203.6 225.0 2.62 ± 0.10
fd-9.0.0 -j4 -u '^$' bench/corpus/rust 84.0 ± 1.2 81.7 86.2 1.00

-j6

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -j6 -u '^$' bench/corpus/rust 237.1 ± 12.1 209.7 250.2 3.90 ± 0.21
fd-9.0.0 -j6 -u '^$' bench/corpus/rust 60.7 ± 1.0 58.9 63.1 1.00

-j8

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -j8 -u '^$' bench/corpus/rust 237.1 ± 5.6 227.1 245.2 4.77 ± 0.16
fd-9.0.0 -j8 -u '^$' bench/corpus/rust 49.7 ± 1.2 47.8 52.2 1.00

-j12

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -j12 -u '^$' bench/corpus/rust 252.9 ± 16.3 225.6 274.7 6.28 ± 0.47
fd-9.0.0 -j12 -u '^$' bench/corpus/rust 40.3 ± 1.6 37.9 44.5 1.00

-j16

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -j16 -u '^$' bench/corpus/rust 252.8 ± 16.6 233.3 279.6 7.20 ± 0.52
fd-9.0.0 -j16 -u '^$' bench/corpus/rust 35.1 ± 1.1 33.2 37.0 1.00

Process spawning

linux v6.5

One file per process

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -u --search-path bench/corpus/linux --max-depth=2 -x true -- 237.9 ± 50.4 164.8 306.9 1.17 ± 0.29
fd-8.7.1 -j1 -u --search-path bench/corpus/linux --max-depth=2 -x true -- 986.4 ± 13.6 955.5 1008.1 4.85 ± 0.61
fd-9.0.0 -u --search-path bench/corpus/linux --max-depth=2 -x true -- 203.2 ± 25.4 169.5 248.4 1.00
fd-9.0.0 -j1 -u --search-path bench/corpus/linux --max-depth=2 -x true -- 979.6 ± 13.3 955.9 990.3 4.82 ± 0.61

Many files per process

Command Mean [ms] Min [ms] Max [ms] Relative
fd-8.7.1 -u --search-path bench/corpus/linux -X true -- 231.9 ± 36.2 214.7 316.0 1.56 ± 0.24
fd-9.0.0 -u --search-path bench/corpus/linux -X true -- 148.9 ± 1.1 146.8 150.9 1.00

Details

Versions

$ fd-8.7.1 --version
fd 8.7.1
$ fd-9.0.0 --version
fd 8.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment