Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Aug 2010 20:36:26 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= <des@des.no>
Cc:        Doug Barton <dougb@freebsd.org>, current@freebsd.org, core@freebsd.org, delphij@freebsd.org, Gabor Kovesdan <gabor@freebsd.org>, Dimitry Andric <dimitry@andric.com>
Subject:   Re: Official request: Please make GNU grep the default
Message-ID:  <AANLkTik6kDn8kzWmtMDWd8OB-o34J-%2BwVqwwf21zDkbZ@mail.gmail.com>
In-Reply-To: <86zkwhr1z3.fsf@ds4.des.no>
References:  <4C6505A4.9060203@FreeBSD.org> <4C6C1CFE.6060900@FreeBSD.org> <86aaoirac1.fsf@ds4.des.no> <AANLkTikmHX5yX5-oSDEb_0tmW2bny8%2BuKf8b368As=k1@mail.gmail.com> <86zkwhr1z3.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
2010/8/20 Dag-Erling Sm=F8rgrav <des@des.no>:
> Adrian Chadd <adrian@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik6kDn8kzWmtMDWd8OB-o34J-%2BwVqwwf21zDkbZ>