Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jul 2007 22:43:16 +0200
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        "Sean C. Farley" <scf@FreeBSD.org>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: Assembly string functions in i386 libc
Message-ID:  <20070711204315.GA49688@freebsd.org>
In-Reply-To: <20070711134721.D2385@thor.farley.org>
References:  <20070711134721.D2385@thor.farley.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070711204315.GA49688>