Skip to content

Why ugrep-v3.1.7-release is 1.95 times faster than rg-v12.1.1-release? #1796

Answered by BurntSushi
saifali-ch asked this question in Q&A
Discussion options

You must be logged in to vote

13ms is nominal. That could be, for example, explained by the number of threads each tool spins up. Your benchmark does not control for that. It could also be explained by different searching techniques, e.g., mmap vs standard read calls. Or maybe ripgrep is reading a config file that you have. I'm on mobile and haven't done any analysis, so I can't say for sure. My point is that the benchmark is somewhat senseless. Please find a benchmark with more than a few milliseconds of difference. For example, by substantially increasing corpus size.

Surprisingly, ugrep is 13.5ms faster than rg. And it just a single file with only 69 lines.

Why are you surprised?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@saifali-ch
Comment options

@BurntSushi
Comment options

@saifali-ch
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants