比 ack 更快,而且还可以跟 vim,textmate,emacs 集成,推荐之。 https://github.com/ggreer/the_silver_searcher
An attempt to make something better than ack (which itself is better than grep).
ack..gitignore and .hgignore..agignore file. *cough* extern *cough*ack!mmap()ed instead of read into a buffer.pcre_study() before executing the regex on a jillion files.fnmatch() on every pattern in your ignore files, non-regex patterns are loaded into an array and binary searched.I've written several blog posts showing how I've improved performance. These include how I added pthreads, wrote my own scandir(), benchmarked every revision to find performance regressions, and profiled with gprof and Valgrind.
OS X:
brew install the_silver_searcher