why GNU grep is fast
Xin LI
delphij at gmail.com
Sun Aug 22 16:11:47 UTC 2010
2010/8/22 Dag-Erling Smørgrav <des at des.no>:
> Amen. The 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,
--
Xin LI <delphij at delphij.net> http://www.delphij.net
More information about the freebsd-current
mailing list