Patch: gcj optimizations

Bryce McKinlay bryce@waitaki.otago.ac.nz
Wed Oct 17 17:05:00 GMT 2001


Tom Tromey wrote:

>Bryce> But using __builtin_cos is still a big win since it will at
>Bryce> least use a hardware optimized implementation (and bypass at
>Bryce> least one level of call).
>
>If the call isn't inlined it will call `cos', not `__builtin_cos'.
>Same difference though -- we supply `cos' in libgcj.
>

Yeah, if you use __builtin_cos in C you get an inlined hardware cos if 
you use "-funsafe-math-optimizations", or a call to cos() if you dont, 
so probibly its best if gcj does the same.

We definately want to make sure our inlined cos uses the system's cos 
and not libgcj's cos, because libgcj's is written in C while the system 
one takes advantage of the hardware FP.

regards

Bryce.




More information about the Java-patches mailing list