Official request: Please make GNU grep the default
Gabor Kovesdan
gabor at FreeBSD.org
Sat Aug 14 16:11:05 UTC 2010
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
More information about the freebsd-current
mailing list