From owner-freebsd-current@FreeBSD.ORG Fri Aug 20 12:36:29 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 9BD0F1065695; Fri, 20 Aug 2010 12:36:29 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 022458FC08; Fri, 20 Aug 2010 12:36:28 +0000 (UTC) Received: by yxe42 with SMTP id 42so1407997yxe.13 for ; Fri, 20 Aug 2010 05:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=uFoQHqycCswY5c8PJ6X/Cqbc40UaWernRBuuy5Q5FZ0=; b=t7oA2TcYdqv+7uKc1fzwj/PRR3PF4aBYXpHZ7sqUKiFkeWJCWdrHtoGRKEr6EXvQ/q R0IvF8bIEZsTl6VcRWN/dNR9uVlEx0TsvxqRS7s/v0FBUEUVgCGjf8e29Q/8dx0Nx1tm xp0Xc4jhpgznzs49zhLf37HwNPakLd9j6+47Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=iuPEY/DAwgbPPoCKHXirjpOxADqHCNGQBwTtn0+Zamx1Ql4mROoxRZq2+ZwkqYQqq8 u79+sGS47mYPcmieb+hPmqOeLx0glmeAM8IW1Mlg+si2z6OJQxhTBUFEm14JbL7gliR7 q4Vz6l3DH5dGyqknGaKufSjiW24WY9i1rBp1A= MIME-Version: 1.0 Received: by 10.101.127.5 with SMTP id e5mr1534674ann.138.1282307787855; Fri, 20 Aug 2010 05:36:27 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.231.168.14 with HTTP; Fri, 20 Aug 2010 05:36:26 -0700 (PDT) In-Reply-To: <86zkwhr1z3.fsf@ds4.des.no> References: <4C6505A4.9060203@FreeBSD.org> <4C6C1CFE.6060900@FreeBSD.org> <86aaoirac1.fsf@ds4.des.no> <86zkwhr1z3.fsf@ds4.des.no> Date: Fri, 20 Aug 2010 20:36:26 +0800 X-Google-Sender-Auth: Z1qVmn4pJhLaqcSY5CkbHhXBGdA Message-ID: From: Adrian Chadd To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Doug Barton , current@freebsd.org, core@freebsd.org, delphij@freebsd.org, Gabor Kovesdan , Dimitry Andric 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 12:36:29 -0000 2010/8/20 Dag-Erling Sm=F8rgrav : > Adrian Chadd writes: >> I've just looked at grep_fgetln(). Surely memchr() isn't required there. > > Of course it is, how else are you going to locate the '\n'? =A0OTOH, I'm > not sure grep_fgetln() is needed at all. It seems a bit strange that memchr(), which should be hitting data that's in the cache (as it was recently read, right?) is showing up so high in the profiling results. memchr() in libc/string/memchr.c looks like how I'd inline it, so, hm. Have you tried this in pmc? Adrian