ag vs. ack – performance booster for programmers
ag has some advantages over ack, or grep.
- Faster
- Excludes files from VCS ignore files (e.g.
.gitignore
) - Searches compressed files
You can learn some basics in CONQUERING THE COMMAND LINE book (free) by Mark Bates. I found it yesterday and it's really good!
In 2.8 Performance Mark compared ag and ack.
As it was tested against older Rails code, let me show you my output:
time ack DHH
real 0m3.040s
user 0m1.561s
sys 0m0.610s
time ag DHH
real 0m0.101s
user 0m0.081s
sys 0m0.137s
Tested on MacBook Air (11-inch, Early 2014)
Going Beyond grep for Searching Source Code is also a good read.
Written by Wojtek Ryrych
Related protips
1 Response
Thanks for spotting this, will replace ack by ag :)
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#