▲ | boltzmann64 15 hours ago | ||||||||||||||||||||||
Has it caught up to ugrep in terms of backward compatibility and speed yet? | |||||||||||||||||||||||
▲ | burntsushi 15 hours ago | parent | next [-] | ||||||||||||||||||||||
Backcompat with what? ripgrep was, is and will never be POSIX compatible: https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#can... Aa for ugrep, flipping the question around would be more appropriate. ugrep has caught up with ripgrep in some common cases, but not all. | |||||||||||||||||||||||
▲ | dgacmu 15 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
This seems like an unhelpful comment? First of all, the ugrep performance comparisons are online (and haven't been updated to compare against this version that was only released 3 days ago). So your question is answerable: https://github.com/Genivia/ugrep-benchmarks The two are very close and both are head and shoulders faster than most other options. And backwards compatibility is a mixed thing, not a mandatory goal. It's admirable that ugrep is trying to be a better drop-in replacement. It's also cool that ripgrep is trying to rethink the interface for improving usability. (I like ripgrep in part because it has different defaults than grep that work very well for my use cases, which is primarily searching through codebases. The lack of backwards compatibility goes both ways. Will we see a posix ripgrep? Probably not. Is ripgrep a super useful and user-friendly tool? Definitely.) | |||||||||||||||||||||||
▲ | burntsushi 13 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
To back up what I said earlier, a common case for ripgrep is to search a code repository while respecting gitignore, ignoring hidden files and ignoring binary files. Indeed, this is ripgrep's default mode. For example, in my checkout of the Chromium repository, notice how much faster ripgrep is at this specific use case (with the right flags given to `ugrep` to make it ignore the same files):
`ugrep` actually does a lot better if you don't ask it to respect gitignore files:
Even ripgrep runs a little faster. Because sometimes matching gitignores takes extra time. More so, it seems, in ugrep's case.Now ugrep is perhaps intended to be more like a POSIX grep than ripgrep is. So you could question whether this is a fair comparison. But if you're going to bring up "ripgrep catching up to ugrep," then it's fair game, IMO, to compare ripgrep's default mode of operation with ugrep using the necessary flags to match that mode. Repository info:
| |||||||||||||||||||||||
▲ | mort96 14 hours ago | parent | prev [-] | ||||||||||||||||||||||
I'm so happy ripgrep has a different interface to grep. I don't typically need ripgrep's better performance, I just use it because 'rg foo' does what I want 99% of the time while 'grep foo' does what I want 1% of the time. | |||||||||||||||||||||||
|