Date: Wed, 11 Jul 2007 15:24:01 -0500 (CDT) From: "Sean C. Farley" <scf@FreeBSD.org> To: freebsd-arch@FreeBSD.org Subject: Assembly string functions in i386 libc Message-ID: <20070711134721.D2385@thor.farley.org>
next in thread | raw e-mail | index | archive | help
While looking at increasing the speed of strlen(), I noticed that on i386 platforms (PIII, P4 and Athlon XP) the performance is abysmal in libc compared to the version I was writing. After more testing, I found it was only the assembly version that is really slow. The C version is fairly quick. Is there a need to continue to use the assembly versions of string functions on i386? Does it mainly help slower systems such as those with i386 or i486 CPU's? I have the results from my P4 (Id = 0xf24 Stepping = 4) system and the test program here[1]. strlen.tar.bz2 is the archive of it for anyone's testing. In the strlen/results subdirectory, there are the results for strings of increasing lengths. I would appreciate it if anyone could see if strlen and strlen2 perform any better on an amd64. Although the current C version of strlen() in 7-CURRENT is faster than mine for smaller values, they perform better for larger strings. I doubt people would want either of my versions in CURRENT just before the freeze :), but it would be nice to use the C version we do have instead of the assembly version. I cannot speak about the other string functions as I have not tested them. Sean 1. http://www.farley.org/freebsd/tmp/ -- scf@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070711134721.D2385>