thecodrr / fdir

⚡ The fastest directory crawler & globbing library for NodeJS. Crawls 1m files in < 1s
https://thecodrr.github.io/fdir/
MIT License
1.51k stars 58 forks source link

how about fdir vs globby ? #25

Closed daolou closed 4 years ago

daolou commented 4 years ago

https://github.com/sindresorhus/globby

Whoaa512 commented 4 years ago

globby is just a convenience wrapper around fast-glob which is in the benchmarks

thecodrr commented 4 years ago

Yes, globby is based on fast-glob so it doesn't make much sense to benchmark against it. If you have any other globbing library in mind, I would love to include it.

IanVS commented 2 years ago

tiny-glob could be an interesting benchmarking target.

IanVS commented 2 years ago

Ah, I see it was added to the benchmark code, but the readme wasn't updated. I ran them locally on my intel mbp, and got:

$ node benchmarks/glob-benchmark.js
Running "Asynchronous (1487 files, 230 folders)" suite...
Progress: 100%

  fdir 5.2.0 async:
    231 ops/s, ±0.18%   | fastest

  glob async:
    15 ops/s, ±1.13%    | slowest, 93.51% slower

  fast-glob async:
    154 ops/s, ±0.95%   | 33.33% slower

  tiny-glob async:
    35 ops/s, ±0.41%    | 84.85% slower

Finished 4 cases!
  Fastest: fdir 5.2.0 async
  Slowest: glob async
Running "Synchronous (1487 files, 230 folders)" suite...
Progress: 100%

  fdir 5.2.0 sync:
    90 ops/s, ±0.33%   | fastest

  glob sync:
    16 ops/s, ±0.62%   | slowest, 82.22% slower

  fast-glob sync:
    71 ops/s, ±0.67%   | 21.11% slower

  tiny-glob sync:
    45 ops/s, ±0.20%   | 50% slower

Finished 4 cases!
  Fastest: fdir 5.2.0 sync
  Slowest: glob sync