|
|
|
|
|
by leakbang
1339 days ago
|
|
I did notice that ripgrep was noticeably faster than grep, however, I'm looking for a solution that searches through the source code as I type. Something like Fsearch but for searching through source code contents. I think for something like this even grep would be fast enough. |
|
You also haven't specified what kinds of queries you're running. If you're doing simple literal queries like 'rg foobar', then ripgrep is pretty much as fast as you're going to get when it comes to non-indexed search. It uses all your CPU cores. On Intel x86_64, it uses AVX2 to do the substring search for 'foobar'. There's just not much you can do to go faster than that in terms of latency.
As I said, if you have a large corpus, then the only way to get instant search times is through an index. You haven't said why those approaches don't work for you.
> I think for something like this even grep would be fast enough.
Sorry I should have mentioned this before, but I'm the author of ripgrep. I know a thing or two about how fast normal exhaustive search greps can go. :-)