Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tinyglobby to product benchmark instead of fdir #466

Merged
merged 2 commits into from
Dec 1, 2024

Conversation

mrmlnc
Copy link
Owner

@mrmlnc mrmlnc commented Dec 1, 2024

First, the fdir package is not a glob solution. Yes, it can be used as a glob, but it simply uses picomatch to find matching paths and does not apply any heuristics. This is clearly visible in our benchmarks. Rather, it is a competitor to @nodelib/fs.walk, not fast-glob.

Using ~/work/fast-glob/fast-glob/herebyfile.mjs to run bench:product:async
Starting bench:product:async:flatten
Label              import.time (time)  time (time)       memory (memory)    entries (value)  process.time (time)
-----------------  ------------------  ----------------  -----------------  ---------------  -------------------
async fast-glob *  10.146ms ±2.178%    4.414ms ±1.719%   5.389 MiB ±0.000%  6 ±0.000%        43.573ms ±1.645%   
async node-glob *  14.556ms ±6.243%    6.483ms ±3.063%   5.137 MiB ±0.293%  6 ±0.000%        50.223ms ±2.531%   
async fdir *       9.138ms ±8.759%     43.941ms ±4.199%  6.380 MiB ±7.375%  6 ±0.000%        85.082ms ±3.145%   

Finished bench:product:async:flatten in 35.8s
Starting bench:product:async:deep
Label               import.time (time)  time (time)        memory (memory)     entries (value)  process.time (time)
------------------  ------------------  -----------------  ------------------  ---------------  -------------------
async fast-glob **  10.139ms ±1.517%    67.479ms ±4.974%   10.663 MiB ±0.800%  17321 ±0.000%    109.259ms ±4.383%  
async node-glob **  14.292ms ±5.569%    159.467ms ±3.012%  25.656 MiB ±2.180%  17321 ±0.000%    209.310ms ±2.666%  
async fdir **       8.980ms ±8.204%     51.330ms ±2.906%   8.832 MiB ±1.093%   17321 ±0.000%    92.592ms ±1.898%   

Finished bench:product:async:deep in 1m 22.2s
Starting bench:product:async:partial_flatten
Label                                            import.time (time)  time (time)       memory (memory)    entries (value)  process.time (time)
-----------------------------------------------  ------------------  ----------------  -----------------  ---------------  -------------------
async fast-glob {fixtures,out}/{first,second}/*  10.243ms ±1.576%    8.927ms ±1.916%   5.044 MiB ±0.126%  2 ±0.000%        48.568ms ±1.513%   
async node-glob {fixtures,out}/{first,second}/*  14.351ms ±5.512%    8.226ms ±2.810%   5.264 MiB ±0.374%  2 ±0.000%        51.684ms ±2.104%   
async fdir {fixtures,out}/{first,second}/*       9.071ms ±8.824%     43.779ms ±3.488%  6.503 MiB ±6.242%  2 ±0.000%        86.557ms ±3.088%   

Finished bench:product:async:partial_flatten in 37.4s
Starting bench:product:async:partial_deep
Label                              import.time (time)  time (time)       memory (memory)    entries (value)  process.time (time)
---------------------------------  ------------------  ----------------  -----------------  ---------------  -------------------
async fast-glob {fixtures,out}/**  10.203ms ±4.545%    9.877ms ±5.598%   5.239 MiB ±0.085%  178 ±0.000%      48.916ms ±3.786%   
async node-glob {fixtures,out}/**  14.350ms ±5.594%    10.967ms ±2.434%  5.546 MiB ±0.295%  178 ±0.000%      54.478ms ±2.044%   
async fdir {fixtures,out}/**       9.029ms ±8.476%     43.141ms ±2.229%  6.492 MiB ±6.712%  178 ±0.000%      85.306ms ±1.786%   

Finished bench:product:async:partial_deep in 37.7s
Starting bench:product:async
Finished bench:product:async in 1ms
Completed bench:product:async in 3m 13.3s

Secondly, another glob package appeared in the ring, which is based on the fdir package. So, great! I'll stay here and observe.

I'm simply replacing fdir with tinyglobby.

@mrmlnc mrmlnc force-pushed the tinyglobby_benchmark branch from 3a43db8 to 6e15541 Compare December 1, 2024 17:03
@mrmlnc mrmlnc changed the title Add tinyglobby to product benchmark Add tinyglobby to product benchmark instead of fdir Dec 1, 2024
@mrmlnc mrmlnc force-pushed the tinyglobby_benchmark branch from 26e2fd1 to 5f42092 Compare December 1, 2024 21:14
@mrmlnc mrmlnc marked this pull request as ready for review December 1, 2024 21:22
@mrmlnc mrmlnc merged commit 1558f62 into master Dec 1, 2024
23 checks passed
@mrmlnc mrmlnc deleted the tinyglobby_benchmark branch December 1, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant