You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Incidentally, I wonder if you have some idea why walkdir might be so much faster than nftw on my system. I discovered this while writing my own code using them, but I found that it's easily replicable with your example programs:
In nftw.c, I removed the printf call and built it with gcc -O3.
$ time ./nftw /usr
./nftw /usr 0.33s user 1.52s system 99% cpu 1.869 total
Walkdir is faster than find for me as well.
Edit: using strace, it looks like the difference is probably that nftw calls stat on every file in the tree, whereas walkdir does not (presumably only calling stat when needed). If that's what's happening here, may be worth mentioning that in the README?
In 526d70b the example was replaced by the walkdir-list crate, but the README still references this old example:
The text was updated successfully, but these errors were encountered: