Date: Fri, 1 Oct 2010 13:10:11 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r213326 - head/lib/libc/i386/string Message-ID: <201010011310.o91DABUU007534@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Fri Oct 1 13:10:11 2010 New Revision: 213326 URL: http://svn.freebsd.org/changeset/base/213326 Log: libc: Remove the i386 assembler version of strlen(3). On anything modern, the C version, which processes a word at a time, is much faster. The Intel optimization manual explicitly warns against using REP prefixes with SCAS or CMPS, which is exactly what the assembler version does. A simple test on a Phenom II showed the C version, compiled with -O2, to be about twice as fast determining the length of 100000 strings between 0 and 255 bytes long. MFC after: 2 weeks Deleted: head/lib/libc/i386/string/strlen.S Modified: head/lib/libc/i386/string/Makefile.inc Modified: head/lib/libc/i386/string/Makefile.inc ============================================================================== --- head/lib/libc/i386/string/Makefile.inc Fri Oct 1 11:48:14 2010 (r213325) +++ head/lib/libc/i386/string/Makefile.inc Fri Oct 1 13:10:11 2010 (r213326) @@ -3,5 +3,5 @@ MDSRCS+=bcmp.S bcopy.S bzero.S ffs.S index.S memchr.S memcmp.S memcpy.S \ memmove.S memset.S rindex.S strcat.S strchr.S strcmp.S strcpy.S \ - strlen.S strncmp.S strrchr.S swab.S wcschr.S wcscmp.S wcslen.S \ + strncmp.S strrchr.S swab.S wcschr.S wcscmp.S wcslen.S \ wmemchr.S
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010011310.o91DABUU007534>