Re:Code Search Is Hard
by worldsayshi on Wednesday April 10, 2024 @06:08PM
(#39996213)
What does 'on the fly' entail here?
[ Parent
| on HN ]
I'm going to guess brute force - scan everything for the search term, rather than trying to use an index.
I'm always amazed at how fast ripgrep (rg) can brute force it's way through hundreds of MBs of source code.
Yes, exactly. When doing a search, we parse and search every file without any indexing.
Of course, it could still be sped up considerably with an index but brute force is surprisingly effective (we use some of the same techniques/crates as ripgrep).