Re:Show HN: Fdir – Faster Node.js glob alternative
by BiteCode_dev on Sunday March 29, 2020 @06:43PM
(#22723470)
Gonna add test with hello world to see vm startup time.
Re:Show HN: Fdir – Faster Node.js glob alternative
by thecodrr on Sunday March 29, 2020 @09:42PM
(#22724466)
If we subtract the vm time from total time that should (very roughly) be the time taken for fdir to crawl the directory.
So basically:
83ms - 55ms = 28ms
Not bad, not bad. :D the scale remains the same tho so not that beneficial.
You can get a rough idea of VM startup time by running a simple hello world program.
fdir is supposed to compete against nodejs alternatives so I am not surprised it comes last. Maybe the next goal should be to optimize it against other cross language platforms.
V8 does a lot of optimizations but there is still overhead. A native solution in bash has little to no overhead so no wonder it's the fastest.
Anyway, thanks again. This benchmark was insightful (also humbling).