Hacker News new | past | comments | ask | show | jobs | submit login

Wait, how is anything faster than grep?



I believe it's because ack and friends skip files you ordinarily don't want by default. So there's no .svn-base duplicates, no cache files generated by tools, etc.


So `find ... | xargs grep ...` is still faster, right?


Depends on if you include time to type the command.

If your find command looks like

    find . -name '*.pl' -o -name '*.pm' | xargs grep foo
and it takes 1 second to finish, and your ack command is

    ack foo --perl
and it takes 1.5 seconds to finish, you can say the grep is faster.

But I just timed the time it takes to type those, and they took me 9.2 vs. 2.3 seconds.

So which is faster: 9.2+1.0 or 2.3+1.5?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: