Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I took the month off work and traveled around Japan, Chile, and Argentina.

During my travels, I managed to do quite a bit of work on The Silver Searcher: https://github.com/ggreer/the_silver_searcher . It's a clone of ack[1], but written in C instead of Perl. I've done a decent amount of profiling[2] to find slow parts and improve the speed. For literal searches it uses a version of Boyer-Moore-Horspool strstr[3]. For regex searches it uses the new JIT compiler in PCRE[4].

Depending on the search, it can be 3-5x faster than ack. And thanks to some contributors this past month, it's now in homebrew and Gentoo portage.

Well, back to the grind tomorrow.

1: http://betterthangrep.com/

2: Using gprof, valgrind, and Instruments.app. See http://geoff.greer.fm/2012/01/23/making-programs-faster-prof...

3: http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_sear...

4: http://sljit.sourceforge.net/pcre.html



Add ability to replace and I'm your fan. :) Until then I'm using my own http://github.com/piranha/goreplace (built in March a year ago :)).




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

Search: