Official request: Please make GNU grep the default

Doug Barton dougb at FreeBSD.org
Fri Aug 13 08:43:19 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Gabor,

I hope at this point it goes without saying that I have a lot of respect
for the work you've done on BSD grep, and I've already told you that I
think you're very courageous for taking the project on. I've been
testing and evaluating it for some time now, and I think I've given it a
fair trial. You've done a fairly good job of responding to bug reports,
and I understand that the exposure BSD grep has received as the default
in HEAD has been very valuable in exposing additional areas that need
work. However, with all that in mind I am officially asking you to
please change the default in HEAD to GNU grep. (Note, I am _not_ asking
you to remove BSD grep from the tree, just to change the default.)

My reason is simple, performance. While doing some portmaster work
recently I was regression testing some changes I made to the --index*
options and noticed that things were dramatically slower than the last
time I tested those features. Thinking that I had made a programming
mistake I dug into my code, and while the regexps that I was using could
be tuned for slightly better performance the problem was not in my code.
I then installed textproc/gnugrep to compare, and the differences were
very dramatic using a highly pessimized test case (finding a match on
the last line of INDEX). The script I used to test is at
http://people.freebsd.org/~dougb/grep-time-trial.sh.txt and a typical
result was:

GNU grep
Elapsed time: 2 seconds

BSD grep
Elapsed time: 47 seconds

I ran the test over a dozen times, _after_ running it a few times to
eliminate caching issues.

I realize that a key rationale for making it the default at this time is
to get it more exposure in order to find and fix any
bugs/incompatibilities with GNU grep. However, at this time the massive
difference in performance clearly means that it's not suitable as the
default for 9-RELEASE, so even if you were to fix every single _other_
problem (aside from performance) it wouldn't matter. That, combined with
the existing (and TMK as yet unfixed) incompatibilities with GNU grep
make this an easy decision.

While I think having BSD licensed utilities in the base is a great goal,
along with better !ascii support, I don't think it's reasonable to
expect our users to sacrifice this much performance to achieve those
goals. OTOH, leaving it in the tree will allow the code to continue
being developed, and tested by those who are interested, and hopefully
you can get the performance up to the point that wider testing will be
meaningful.


Regards,

Doug

- -- 

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/

	Computers are useless. They can only give you answers.
			-- Pablo Picasso

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iQEcBAEBCAAGBQJMZQWkAAoJEFzGhvEaGryEsWYIAMraJP6LtQNJkTGRHWxxCArM
eGTdAEjdJYs109JYMNU5GHDP/DtGKUdMR7y9Zi4KqlAYgHkpG+LheY1lmnzrXqJY
BuDxsDqGPt3xfrAo55OP8CRtF3fbh6vJUiGNen+sPyqkCazZfe3Rer3LaYtwtM2y
kwuQvnFsD5nMIilstFaBaYcEPwXzpgRB+ejcSwMRUr7SYOAb+0xcR7bz7EVySi2L
3fx1tCxDrGrS8XBOn9ug29B5OY1OdSyWR3WeHyKSt8mJV2ZZJtEsSJyBZMNQT3r/
ZiSvj4ESK9NXZP0mFTj1nRyJq+tWO2sEWGr/oSAPaO3K2CubfhPU5h6Utj48k7g=
=+K+D
-----END PGP SIGNATURE-----


More information about the freebsd-current mailing list