On Thu, 30 Sep 2010, Dimitry Andric wrote:

Log:
 Retire the amd64 and i386 specific inline assembly versions of ldexp.c,
 as they are slower than the generic version in C, at least on modern
 hardware.  This leaves us with just five implementations.

 Suggested by:  bde
 Approved by:   rpaulo (mentor)

Thanks.

I suppose it has had enough testing.  I just tested it on a Celeron 366
(late 90's P2 arch).  The C version is faster there too:

libc asm ldexp:  1.98 seconds
libm asm scalbn: 1.91
libm C   scalbn: 1.84

While there, I noticed that the libm asm scalbn is still using RCSID(),
like many of the older libm asm functions.  This is not just a style
bug.  RCSID() and __RCSID() are compatibility cruft that should never
be used.  The RCSID() in i386/include/asm.h is especially bad.  It
bloats the text section with $FreeBSD$ strings using ".text; .asciz...".
__FBSDID() normally uses .ident which normally puts the strings in a
better place.

Are there only 5 implementations left? :-)  arm is the only arch that
still has one in libc.  amd64 are i386 the only arches that have asm
versions of scalbn in libm.  They are there for float and long double
precision too.  This is especially silly for float precision since the
integer versions are especially easy to make efficient for float
precision.  OTOH, long double precision is probably still faster in
asm.  There are also silly scalbln* interfaces (taking a long for the
exponent).  These are only implemented in C (as wrappers).

Bruce



Bruce
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to