On a previous post I talked about how The Silver Searcher was a very fast way to search through a codebase. I was made aware of a different tool called ripgrep.

Let me just post this for comparison:

❯ rg -t clojure --stats -q main
210 matches
186 matched lines
90 files contained matches
447 files searched
0 bytes printed
1785713 bytes searched
0.171875 seconds spent searching
0.446368 seconds

❯ ag --clojure --stats-only main
349 matches
98 files contained matches
517 files searched
3435452 bytes searched
3.404591 seconds

Just, wow.

Yes, yes I see that ag searched in more files, this is because it didn’t fully understand .gitignore files.

I don’t think there’s much I can add to this except go try it out! It did take me some time to get used to the new CLI options but just read the manual and it’ll take care of you.