Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: optimized memchr (and probably other string functions)

On Wed, Jun 03, 2009 at 12:28:38AM +0200, Wolfgang Solfrank wrote:
> Hello,
> by accident I stepped over the "optimized" implementation of memchr
> in src/common/lib/lic/arch/x86_64/memchr.S.  The code in there blindly
> copies the logic from src/common/lib/libc/arch/x86_64/strlen.S without
> consideration of the comments in that code.


I've looked at those functions, and might change them - at least to
do something more sensible once an 'incorrect' pattern is found.

I'll also look (a bit) into the instruction sequencing, and how
well they work on small strings.

(Oh fix the comments from 'rare cases' to 8-bit data!)


David Laight: david%l8s.co.uk@localhost

Home | Main Index | Thread Index | Old Index