Last Updated: February 25, 2016
·
1.546K
· ryrych

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.

1 Response
Add your response

Thanks for spotting this, will replace ack by ag :)

over 1 year ago ·