All, I was writing my own, 'grep-like' program, and while doing so, I noticed that grep is exceedingly fast.
This simple loop on linux takes about 3 seconds, vs a whole grep run
which took 1.
while (fgets(buf, 32768, fp) { }
Adding pcre made my equivalent 'grep' command come out to about 8 seconds.
So how does grep manage to be so fast? I'm really curious about this; I'd like
to emulate this behavior if possible, or maybe use grep as an API if possible.
Thanks much,
Ed
