-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
benchmark time on very small corpora #33
Comments
#77 is another report of |
Someone ran micobenchmarks on infinitesimally sized input. |
OK, I think I can call this one done. I think a variety of small improvements have mostly fixed this:
In particular, on the previously linked microbenchmark:
Compare this with ripgrep 0.2.6:
I've also done some testing on small repos. This repo qualifies as quite small. There is a ton of variance. The following were ran in succession:
But, if we fix both programs to use a single thread, then variance becomes almost non-existent:
and
In other words, on small corpora, ripgrep (and, to a lesser extent, I'm not sure there's anything we can really do about it. The difference in this particular example, at least, is nominal. From a user's perspective, we don't really care about the difference between 10ms and 30ms. However, the place where this can hurt us is if folks use ripgrep like it was grep, for example, in an
The overhead of ripgrep launching threads ends up making it twice as slow. Of course, in this case, ripgrep launching threads doesn't really make much sense since
The other case to consider is using
While worse than using
I'm not sure there's really too much we can do here. An end user can use ripgrep in an (This is yet another example proving that benchmarking these tools is ridiculously hard.) |
An end user reports that
rg
isn't as fast onag
on very small repositories. While it seems trivial, if this is because of startup time, then it's worth investigating and fixing.The text was updated successfully, but these errors were encountered: