Re:Show HN: Fdir – Faster Node.js glob alternative
by tastroder on Monday March 30, 2020 @05:19AM
(#22726382)
The upside would be that you can specifically control when to pass values between the underlying C++ and the v8 runtime.
But anyway, this implementation is quite nice. I tried to recreate a more meaningful benchmark between a few of the libraries you compared with but on a real file system structure rrdir and node-walk just noped out by exceeding the maximum call stack size. Increasing that yielded pretty much the same results as your library for rrfind in the sync setting with the overhead likely being down to that one returning an object (mean difference between 50-100ms higher on ~1.1 million files).
Re:Show HN: Fdir – Faster Node.js glob alternative
by thecodrr on Monday March 30, 2020 @05:48AM
(#22726490)
You give a very valid reason to tryout an implementation in C++. I will definitely look into it. Thanks.
Would love to see the benchmark results! Do share a link if you can.
Thanks for auditing and taking the interest!
I don't see the point of implementing it in c++ simply because I wanted to keep it simple, dependency free and easy to maintain. The fact that I know very little C++ also influenced that decision. Moreover, I am sure that way would be faster (from my understanding).