grep library?

Kelet kelethunter at gmail.com
Sat Oct 26 21:18:08 PDT 2013


On Sunday, 27 October 2013 at 02:59:58 UTC, Andrei Alexandrescu
wrote:
> Hello,
>
>
> A coworker implemented a system that spawns grep to rummage 
> through a large log file. Apparently doing so is quite a bit 
> faster than using a regex.
>
> This is because grep is highly specialized and optimized. I was 
> wondering if we could implement a grepping library that builds 
> on regex's strengths and also grep's many optimization tricks: 
> http://lists.freebsd.org/pipermail/freebsd-current/2010-August/019310.html
>
>
> Andrei

Great idea,

The author of The Silver Searcher, a similar text search tool,
has also posted some information on how to make a fast search
tool. It seems to use Boyer-Moore-Horspool for literal searches
(similar to grep); however, regex searches are done using PCRE.

http://geoff.greer.fm/2011/12/27/the-silver-searcher-better-than-ack/
https://github.com/ggreer/the_silver_searcher


More information about the Digitalmars-d mailing list