From owner-freebsd-current@FreeBSD.ORG Sat Aug 14 16:11:05 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 9A4A5106566B; Sat, 14 Aug 2010 16:11:05 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3628FC23; Sat, 14 Aug 2010 16:11:04 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id D1CD214DC548; Sat, 14 Aug 2010 18:11:02 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id hiTtYVHoGwGN; Sat, 14 Aug 2010 18:11:00 +0200 (CEST) Received: from [192.168.1.105] (catv-80-99-92-167.catv.broadband.hu [80.99.92.167]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 7621D14DC64F; Sat, 14 Aug 2010 18:11:00 +0200 (CEST) Message-ID: <4C66C010.3040308@FreeBSD.org> Date: Sat, 14 Aug 2010 18:10:56 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Roman Divacky References: <4C6505A4.9060203@FreeBSD.org> <20100813085235.GA16268@freebsd.org> In-Reply-To: <20100813085235.GA16268@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: delphij@FreeBSD.org, Doug Barton , core@FreeBSD.org, 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: Sat, 14 Aug 2010 16:11:05 -0000 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