This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Performance improvement for log()


-----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-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]