RFC: MI strlen()

Julian Elischer julian at elischer.org
Tue Jan 13 10:31:50 PST 2009

> I reran the test.  I had to change -O2 to -O to test builtin strlen,
> and made some other changes in a failed attempt to force __builtin_strlen
> with -O2).  builtin strlen is much slower than I remembered.  The
> NetBSD asm strlen (it uses the 0x8080 trick with 64-bit words) is
> about 4.5 faster for long strings but slower for short strings (ones
> shorter than the word size).  I expect your C version is similar.

any chance you could try this and make a suggestion as to whether we 
might adopt the new code?


More information about the freebsd-arch mailing list