tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Replacing usr.bin/grep with the version from FreeBSD
>> > Hi all,
>> > any objection to integrate the current BSD grep version from FreeBSD?
>> > It is supposed to be working for almost all cases as GNU grep
>> > replacement. It is slower in some cases (which might be fixed by TRE),
>> > but it should generally be in a much better shape than the current code
>> > we have.
>>
>> It doesn't handle everything GNU grep handles and it is slower? For a
>> user that does not qualify as "much better shape".
> The grep currently in our tree is not GNU grep -- is it?
> I believe what Joerg is saying is that FreeBSD's grep is much better
> than ours and almost as fast as GNU grep, and with the new regex
> library might in fact be as fast as GNU grep.
If anybody is interested in regexp performance have a look at wip/mawk-*
projects. They are mawk linked against different regexp engines. TRE is
perfect (from theoretical point of view) for submatch (needed in
e.g. sed) but is not so good for awk and grep where simple DFA-based
regexp for small regexps are usually significantly faster. Some time ago
I tested all these awks with gawk and nawk from NetBSD cvs tree. For big
regexps gawk and nbawk were clean winners. mawk-tre was dozens of times
slower. I believe grep linked with TRE will show the same results.
I have no any knowledge about FreeBSD grep and their regexp (if they
have one).
> In other words, it's strictly better than what we already have, no?
> Thor
--
Best regards, Aleksey Cheusov.
Home |
Main Index |
Thread Index |
Old Index