by coldtea · 10y ago · 0 comments
It searches code about 3–5× faster than ack.
It searches code as fast as the_silver_searcher(ag).
It ignores file patterns from your .gitignore.
It searches UTF-8, EUC-JP and Shift_JIS files.
It provides binaries for multi platform (Mac OS X, Windows, Linux).
But even more so, sensible defaults that work nicely for code search use cases. And written in Go, without accumulated cruft for 200 platforms and POSIX subtleties like grep, so even someone like me can hack it to do something special if I want to.
$ time ag zmq | wc -l
63
real 0m0.017s
user 0m0.022s
sys 0m0.016s
$ time pt zmq | wc -l
296
real 0m0.013s
user 0m0.014s
sys 0m0.017s
(Timing differences consistent over multiple runs of both on the same codebase -- no disc cache effect) -- the wc difference is because of different "surrounding context" setting.