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...
'bench' turns out to be this tool: https://github.com/Gabriel439/bench It seems to be quite useful, and I was not aware of it, thanks! Would probably be nice to have it packaged in distributions...
for a narrow set of usecases with cold page caches I have written ffcnt[0]. As the name says I mostly use it to count how many million files have accumulated over time in a large directory tree. It could be extended to do regex matching on filenames a la find though, I just never had the need for it.
> 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?
I am not sure if I find that a smart default as I frequently exclude generated files from git repositories and when want to find something I do not know why I would not like to find such a file if my pattern matches it.
I would prefer to let the switch enable the .gitignore logic, but as I don't know the authors use-case, theirs might be valid too.
Surely the common case is that you don't want to search generated files? Or at least I personally am almost never interested in generated files because they're not the ones I'm going to be changing/doing stuff with.
Aye, that's because being written in Python, C or Go is - in my eyes - a strike against the project in an absolute sense, because it will be more buggy and difficult to maintain due to lacking the functional-programming abstractions and powerful static-type system of a good ML descendant such as Rust or OCaml. (Or of Haskell, but it tends to lack the practicality of the ML family.)
So of course one does not trumpet that one's project is written in Python, C or Go. n.b. I said "absolute sense" because all of this this is, of course, inapplicable when searching for libraries specifically for a language such as Python, C, or Go.
I don't buy it. People say, "X (written in Foo)" because there is fundamentally an interest in the fact that something is written in Foo (and this may indeed depend on the nature of X). Back when Go was new and shiny, it was the same situation.[1] :-)
Rust is somewhat of a special case: I bet some people mention their software is written in Rust just to avoid a bunch of comments proposing to rewrite it in Rust,
In a package manager I wouldn't expect to see it. On HN, especially as a Show HN, the audience has a much higher likelihood of being interested in digging into the code, perhaps even becoming a contributor. That makes the language used much more pertinent.
Comments (215) 23 threads
Earlier commentsThe 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...
'bench' turns out to be this tool: https://github.com/Gabriel439/bench
It seems to be quite useful, and I was not aware of it, thanks! Would probably be nice to have it packaged in distributions...
[0] https://github.com/the8472/ffcnt
https://github.com/rust-lang/rfcs/pull/1623
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?
fd uses Rusts regex engine (https://github.com/rust-lang/regex) which is based on finite automata.
I would prefer to let the switch enable the .gitignore logic, but as I don't know the authors use-case, theirs might be valid too.
So of course one does not trumpet that one's project is written in Python, C or Go.
n.b. I said "absolute sense" because all of this this is, of course, inapplicable when searching for libraries specifically for a language such as Python, C, or Go.
[1] - https://news.ycombinator.com/item?id=4685594
Continue this thread — 3 replies
All comments shown.
Couldn't load more comments. Check your connection and try again.