Date: Tue, 13 Jan 2009 10:03:15 -0800 From: Julian Elischer <julian@elischer.org> To: Bruce Evans <brde@optusnet.com.au> Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= <des@des.no>, d@delphij.net, freebsd-arch@freebsd.org Subject: Re: RFC: MI strlen() Message-ID: <496CD763.80107@elischer.org> In-Reply-To: <20090114005432.Y31765@delplex.bde.org> References: <4966B5D4.7040709@delphij.net> <86zlhw5zsr.fsf@ds4.des.no> <496C3A80.5040007@delphij.net> <20090113232658.E31712@delplex.bde.org> <20090114005432.Y31765@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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? >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?496CD763.80107>