Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Aug 2010 08:48:28 -0700
From:      Xin LI <delphij@gmail.com>
To:        =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= <des@des.no>
Cc:        Mike Haertel <mike@ducky.net>, gabor@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: why GNU grep is fast
Message-ID:  <AANLkTinaBzzHxOwup13QPp-6QP0AD2v7eX-uFfjB32tn@mail.gmail.com>
In-Reply-To: <86k4nikglg.fsf@ds4.des.no>
References:  <201008210231.o7L2VRvI031700@ducky.net> <86k4nikglg.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
2010/8/22 Dag-Erling Sm=C3=B8rgrav <des@des.no>:
> Amen. =C2=A0The current bottleneck in BSD grep is the memchr() that looks=
 for
> '\n' in the input buffer.

FYI I actually have a rewritten memchr() which is faster than the
current one here:

http://people.freebsd.org/~delphij/for_review/memchr.c

Review/comments welcome.  I've done some preliminary
validation/benchmark on this but still need to compare it with some
hand optimized assembler implementations that I have seen and see if
it's worthy.

Cheers,
--=20
Xin LI <delphij@delphij.net> http://www.delphij.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinaBzzHxOwup13QPp-6QP0AD2v7eX-uFfjB32tn>