From owner-freebsd-current@FreeBSD.ORG Sat Aug 14 23:05:07 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC00110656A4 for ; Sat, 14 Aug 2010 23:05:07 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 914A18FC1B for ; Sat, 14 Aug 2010 23:05:07 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OkPmi-0004uG-6Z for freebsd-current@freebsd.org; Sun, 15 Aug 2010 01:05:04 +0200 Received: from 26-113.dsl.iskon.hr ([89.164.26.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 15 Aug 2010 01:05:04 +0200 Received: from ivoras by 26-113.dsl.iskon.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 15 Aug 2010 01:05:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Ivan Voras Date: Sun, 15 Aug 2010 01:04:52 +0200 Lines: 29 Message-ID: References: <4C6505A4.9060203@FreeBSD.org> <4C650B75.3020800@FreeBSD.org> <4C651192.9020403@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 26-113.dsl.iskon.hr User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 In-Reply-To: <4C651192.9020403@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 23:05:07 -0000 On 13.8.2010 11:34, Doug Barton wrote: > On 08/13/2010 02:08, Gabor Kovesdan wrote: >> Ok, I'll take care of this soon, and make GNU grep default, again with a >> knob to build BSD grep. I agree with you that we cannot allow such a big >> performance drawback but I my measures only showed significant >> differences for very big searches and I didn't imagine that it could add >> up to such a big diference. > > To be fair, I didn't notice a performance difference either until I > started revamping this code that calls my parse_index() for every single > installed port. Given a 22,042 line INDEX file, that's enough to add up > to something noticeable. Wouldn't this might, just might, be an indication that one of the following is true: 1) writing complex performance-sensitive utilities in shell code simply sucks because it's too sensitive to issues like borderline behaviours of utilities 2) implementing complex data structures that might save you reparsing on the order of complexity of O(npkg * nlines) is too demanding in shell code and this means it's not exactly the best tool for the job ? This post brought to you by The Legue for Retiring Shell Scripts Longer Than 100 Lines - our motto is "Fighting against the tide - why not?" :)