This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Performance improvement for log()
- From: Ulrich Drepper <drepper at redhat dot com>
- To: munroesj at us dot ibm dot com
- Cc: GLIBC-alpha <libc-alpha at sources dot redhat dot com>, "Ryan S. Arnold" <rsa at us dot ibm dot com>
- Date: Thu, 10 Apr 2008 10:27:33 -0700
- Subject: Re: [PATCH] Performance improvement for log()
- References: <1204586869.9440.180.camel@spokane1.rchland.ibm.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Steven Munroe wrote:
> This patch redefines ABS(x) as __builtin_fabs(x).
And to do this you copy the entire file? This is insane. Do what is
done elsewhere. Write a wrapper which defines macros and then uses the
orginal code. I know this means changes to some headers. But code
duplication isn't acceptable.
> Also the call out to __isnan() in the posix wrapper code (w_log()) was
> showing up hot in the profiles. So I added --with-cpu=[power4|power6]
> implementations that effectively in-line the isnan() test within
> __log().
That seems to be a bad idea as well. It's no ppc-specific problem.
Again, use macros to abstract out the actual code use so that other
archs can parametrize this code as well.
- --
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFH/k4F2ijCOnn/RHQRApoLAJ4uzst/VWPr0AzVWIm3cPw9x7hRhwCggQDu
KDVQS4ye62Eyfd5OOPAy6i8=
=T4Bh
-----END PGP SIGNATURE-----