3 ms·
AFAIK ripgrep always uses regular expressions. So for straight substring matching grep will usually be faster.
by davemp 7y ago
AFAIK ripgrep always uses regular expressions. So for straight substring matching grep will usually be faster.
- burntsushi 7y agoIt does not. Could you please say where you got this impression so I could fix it? See my other comments in this very thread. ripgrep actually has more sophisticated literal extraction & searching than GNU grep does. Moreover, many of these optimizations are inside the regex engine itself, so even if it looks like you're using a regex, literal optimizations may still be applied.
- davemp 7y agoMy mistake. I read the first line of the ripgrep readme and assumed because utils like `find` run slower with regex matching for the same searches that ripgrep would be similar. > ripgrep is a line-oriented search tool that recursively searches your current directory for a regex pattern I'm not sure if many other people would jump to similar conclusions. So the readme might not really need a revision.