> The one exception: grep on files is still orders of magnitude faster than anything else. I believe there also was an article about this on HN a while ago.
I'd like to see that article! Faster than jq for sure, but my experience is that ack/ag/rg are all orders of magnitude faster than grep for typical uses.
Also I think there is a difference between grep on files, i.e. "grep ... file1 file2" or "grep ... -R somedir" and grep on stdin, i.e. "something | grep ...".
My understanding was that in the first case, grep can make use of random access APIs to control the size of the input chunks it processes or skip over parts that are known in advance not to match. That's not possible if the input is fed through stdin.
I haven't seen any actual comparisons though apart from "subjective" speed. So things might be wrong.
I'd like to see that article! Faster than jq for sure, but my experience is that ack/ag/rg are all orders of magnitude faster than grep for typical uses.