-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
rg 11.0.0 major performance regression #1268
Description
What version of ripgrep are you using?
$ /local/rulch/rg10/ripgrep-0.10.0-x86_64-unknown-linux-musl/rg --version
ripgrep 0.10.0 (rev 8a7db1a)
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)
vs
$ /local/rulch/rg1100/ripgrep-11.0.0-x86_64-unknown-linux-musl/rg --version
ripgrep 11.0.0 (rev d7f57d9)
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)
How did you install ripgrep?
Downloaded from the prebuilt archives.
What operating system are you using ripgrep on?
Ubuntu 16:
$ uname -a
Linux #hostname_elided# 4.4.0-141-generic #167-Ubuntu SMP Wed Dec 5 10:40:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
This also appears to reproduce on ubuntu 12 as well. I found this problem while introducing ripgrep to a coworker and noticed how it was operating slowly (relative to what I'm used to) on his machine. Then I downloaded it to mine and noticed the same performance difference.
Describe your question, feature request, or bug.
I'm seeing a ~5x slowdown for identical searches on identical files (results repeatable).
If this is a bug, what are the steps to reproduce the behavior?
I cannot include the corpus of my own work repository so I tried with the Open Office repo where I see a slowdown of 3-4x:
$ time /local/rulch/rg1100/ripgrep-11.0.0-x86_64-unknown-linux-musl/rg --debug okay > out-new 2>&1
real 0m0.808s
user 0m4.724s
sys 0m3.192s
$ time /local/rulch/rg10/ripgrep-0.10.0-x86_64-unknown-linux-musl/rg --debug okay > out-old 2>&1
real 0m0.252s
user 0m1.304s
sys 0m1.328s
Open Office Repo: https://github.com/apache/openoffice @ commit 633ece0517
Please see the attachments for the new and old output with --debug provided.
out-new.txt
out-old.txt
In the Open Office repository it's not all that significant in terms of absolute time, but in my repository at work it causes searches to take a few seconds as opposed to half a second (at least for a small'ish number of results) on a 24 core machine. With less powerful CPUs I can see this being pretty impactful. It's annoying but still faster than grep. Is there some default behavior that changed from 0.10 to 11.0.0 that could explain this?