Date: Mon, 12 Jan 2009 22:53:52 -0800 From: Xin LI <delphij@delphij.net> To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= <des@des.no> Cc: d@delphij.net, freebsd-arch@FreeBSD.org Subject: Re: RFC: MI strlen() Message-ID: <496C3A80.5040007@delphij.net> In-Reply-To: <86zlhw5zsr.fsf@ds4.des.no> References: <4966B5D4.7040709@delphij.net> <86zlhw5zsr.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dag-Erling Smørgrav wrote: > Xin LI <delphij@delphij.net> writes: >> Here is a new implementation of strlen() which employed the bitmask >> skill in order to achieve better performance on modern hardware. > > Why bother? Do we have code that uses strlen() heavily in performance- > critical regions? Does anybody? I agree that strlen() should never be used in performance-sensitive regions, but given we do not have assembly optimized versions of these functions for amd64 and almost everybody else has it, having a C version that gives similar performance is valuable. Also, worldstone with -j9 on 2x4core machine with both src/ and obj/ in tmpfs, seems to have small, but positive effect: Unpatched libc: 1400.97 real 4159.34 user 2901.08 sys 1396.73 real 4159.06 user 2906.16 sys 1380.27 real 4158.20 user 2803.22 sys Patched libc: 1363.29 real 4154.89 user 2749.94 sys 1373.96 real 4150.45 user 2830.46 sys 1368.62 real 4152.48 user 2838.52 sys (with 'make cleanworld' between builds) Cheers, - -- Xin LI <delphij@delphij.net> http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAklsOoAACgkQi+vbBBjt66COQgCfTmpQK9YliCxpdJkckJ2/cZim NzEAoKRqC2HN1FtKRWaZhstYyVjYeewr =eeea -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?496C3A80.5040007>