From owner-freebsd-current@FreeBSD.ORG Fri Aug 13 09:08:33 2010 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E7961065700; Fri, 13 Aug 2010 09:08:33 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id A4F348FC26; Fri, 13 Aug 2010 09:08:32 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 29BFD9CB12F; Fri, 13 Aug 2010 10:52:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uQ-wGBIFlprz; Fri, 13 Aug 2010 10:52:35 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 75CD99CB1C7; Fri, 13 Aug 2010 10:52:35 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.4/8.14.4/Submit) id o7D8qZwf016602; Fri, 13 Aug 2010 10:52:35 +0200 (CEST) (envelope-from rdivacky) Date: Fri, 13 Aug 2010 10:52:35 +0200 From: Roman Divacky To: Doug Barton Message-ID: <20100813085235.GA16268@freebsd.org> References: <4C6505A4.9060203@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C6505A4.9060203@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: delphij@FreeBSD.org, core@FreeBSD.org, Gabor Kovesdan , current@FreeBSD.org Subject: Re: Official request: Please make GNU grep the default X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2010 09:08:33 -0000 On Fri, Aug 13, 2010 at 01:43:16AM -0700, Doug Barton wrote: > -----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 what about optimizing BSD grep instead?