Assembly string functions in i386 libc
Roman Divacky
rdivacky at FreeBSD.org
Wed Jul 11 21:02:23 UTC 2007
On Wed, Jul 11, 2007 at 03:24:01PM -0500, Sean C. Farley wrote:
> 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.
just to state facts... glibc 2.3.6 uses almost exactly the same asm code for i386
(cld;repn[ez] scasb)
More information about the freebsd-arch
mailing list