From owner-freebsd-current@FreeBSD.ORG Fri Aug 20 19:27:46 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 01D9D10656AA for ; Fri, 20 Aug 2010 19:27:46 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id AF6F88FC1E for ; Fri, 20 Aug 2010 19:27:45 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id CED451FFC34; Fri, 20 Aug 2010 19:27:44 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id A4A888456E; Fri, 20 Aug 2010 21:27:44 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alan Cox References: <4C6505A4.9060203@FreeBSD.org> <20100813085235.GA16268@freebsd.org> <4C66C010.3040308@FreeBSD.org> <4C673F02.8000805@FreeBSD.org> <20100815013438.GA8958@troutmask.apl.washington.edu> <4C67492C.5020206@FreeBSD.org> <8639ufd78w.fsf@ds4.des.no> <4C6844D8.5070602@andric.com> <86sk2faqdl.fsf@ds4.des.no> <4C6AAA88.5080606@andric.com> <4C6AF13A.1080606@andric.com> <4C6D3BBB.7030104@andric.com> <4C6D5302.4030602@cs.rice.edu> Date: Fri, 20 Aug 2010 21:27:44 +0200 In-Reply-To: <4C6D5302.4030602@cs.rice.edu> (Alan Cox's message of "Thu, 19 Aug 2010 10:51:30 -0500") Message-ID: <8639u9f5jj.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: alc@freebsd.org, Dimitry Andric , 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, 20 Aug 2010 19:27:46 -0000 Alan Cox writes: > Here is what actually puzzles me about these results. With > traditional I/O, even after the optimizations to bsdgrep, the system > time for gnugrep is still less than half that of the optimized > bsdgrep. I haven't looked at the changes, but I would have thought > the system time for gnugrep and bsdgrep would be almost the same. Two reasons: 1) BSD grep does tons of unnecessary memory-to-memory copy operations in grep_fgetln(). 2) GNU grep has its own highly optimized regex code. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no