Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Aug 2010 18:10:56 +0200
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        Roman Divacky <rdivacky@FreeBSD.org>
Cc:        delphij@FreeBSD.org, Doug Barton <dougb@FreeBSD.org>, core@FreeBSD.org, current@FreeBSD.org
Subject:   Re: Official request: Please make GNU grep the default
Message-ID:  <4C66C010.3040308@FreeBSD.org>
In-Reply-To: <20100813085235.GA16268@freebsd.org>
References:  <4C6505A4.9060203@FreeBSD.org> <20100813085235.GA16268@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Em 2010.08.13. 10:52, Roman Divacky escreveu:
> what about optimizing BSD grep instead?
>    
[... picking one mail from the many that suggest this ...]

The problem is that optimization is not that trivial. I think the 
bottleneck is the regex library because:
1, BSD grep is so simple. There may be optimization opportunities and 
they may help but not that much. But if someone can check the code and 
make some suggestions, of course, I'll track those down and try to get 
more of it.
2, GNU grep uses internal optimizations to get that performance. I think 
it's a wrong approach because the regex library itself should be 
optimized instead to keep BSD grep clean and simple and to provide the 
same efficiency for all utilities that are linked to the regex library. 
Our libc-regex is definitely need to be replaced at some point in the 
future but that's a more complex item. See the following references:
http://wiki.freebsd.org/BSDgrep
http://wiki.freebsd.org/Regex

If you can make suggestions to make BSD grep faster without touching the 
regex library please do it and if we can get a performance that is 
acceptable, we can reconsider leaving it the default if nobody objects. 
I'll check Sean's suggestions and make some measures how much does that 
help.

Gabor



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C66C010.3040308>