Don't optimize by hand (Was Re: Lack of fabsf on Solaris (patch included))

Andrew Haley aph@redhat.com
Fri Jan 26 05:56:00 GMT 2001


Bryce McKinlay writes:
 > Cedric Berger wrote:
 > 
 > > Conclusion(1): trust the compiler and write clean code!
 > > Conclusion(2): I suggest implementing ABS1 for Math.abs(float)
 > 
 > Is there some reason why Math::abs(float) and friends can't just be
 > implemented as "__builtin_fabsf()", etc, in libgcj?

Possibly.  We'd have to be sure that they conformed to the JLS
specification: simply calling __builtin_fabsf() isn't necessarily
going to do that, although it will on x86.

Andrew.



More information about the Java mailing list