3 ms·
I was a bit surprised by a simple test I just ran on a Linux 3.10 tree: time rgrep aes . > /dev/null real 0m0.900s user 0m0.548s sys 0m0.340s
by e12e 13y ago
I was a bit surprised by a simple test I just ran on a Linux 3.10 tree:
time rgrep aes . > /dev/null
real 0m0.900s
user 0m0.548s
sys 0m0.340s
# Somewhat similar output to ag:
time rgrep -n --color aes . > /dev/null
real 0m1.177s
user 0m0.876s
sys 0m0.288s
time ag aes > /dev/null
real 0m1.147s
user 0m1.040s
sys 0m0.548s
# Using fixed strings in grep, limiting us to searching c-files
time rgrep -n --color -F --include='*.c' aes . > /dev/null
real 0m0.936s
user 0m0.720s
sys 0m0.208s
time ag -G \.c aes > /dev/null
real 0m1.130s
user 0m1.140s
sys 0m0.428s
This is on an encrypted volume sitting on top of a low end SSD, all runs
with hot chache. The times here are from ag in Debian -- I tried a build
from upstream git -- but with essentially the same time.
I guess ag might make sense under OS X -- but there doesn't appear to be
any (speed) advantages under GNU/Linux.
- mh- 13y agonice, thanks for sharing. I was actually contrasting it to ack in my speed claims. I don't expect that it'd be that much faster than GNU grep in most situations.