Live data from Hacker News

Show HN: A simple, fast and user-friendly alternative to find, written in Rust

github.com

1–10 of 225 posts

Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust

#3

For the benchmarks did you clear the page cache inbetween runs? It’s crazy fast and seems a little suspect

The readme says the benchmarks are designed to run warm, so I would assume each was run once or twice beforehand.

Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust

#5

For the benchmarks did you clear the page cache inbetween runs? It’s crazy fast and seems a little suspect

Thank you for the feedback!

The benchmarks that are mentioned in the README are performed for a "warm cache", i.e. I'm running one of the tools first to fill the caches. Then, I'm performing multiple runs of each tool (using bench for some nice statistics) such that both tools profit from the warmed-up cache.

I also perform other benchmarks where I clear the caches. In this case, 'fd' is usually even faster.

The scripts for both warm and cold cache are here: https://gist.github.com/sharkdp/4bc3e5f5ea9df2f29c02ede50634...

Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust

#8
post #4

My main usecase for find is not only finding files, but to do actions on them through -exec. Unless I’m missing something, that’s not supported with this tool.

Thank you for the feedback!

'-exec' is not supported at the moment. It's definitely something I would consider adding.

We do have '-0'/'--print0' to separate results by NULL, so 'fd' can be used in combination with 'xargs'.

Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust

#9
post #7

> Ignores patterns from your .gitignore, by default. Do you need to be in the current git directory for this to happen, or all git dirs that happen to be traversed? And are you using an NFA based regex engine?

It will work for all git directories that are encountered. This behavior can be disabled with the '-I' flag, if needed.

fd uses Rusts regex engine (https://github.com/rust-lang/regex) which is based on finite automata.

Re: Show HN: A simple, fast and user-friendly alternative to find, written in Rust

#10

It is incredibly fast! Thanks a lot for this great tool!

Thank you for the feedback! Most of the credit for the speed goes to the amazing Rust modules 'ignore' and 'regex', which are also used by ripgrep (https://github.com/BurntSushi/ripgrep).
Post reply on HN