Native compilation article

Bryce McKinlay
Thu Jan 31 15:54:00 GMT 2002

Jeff Sturm wrote:

>>16364 int -O2 -funroll-all-loops
>>48362 long -O2
>The huge (factor of 3) difference appears to be caused by register
>spillage.  Perhaps the experiemental regalloc would help.  From a quick
>look at the assembly it wasn't obvious to me how it would improve (though
>I'm certainly no expert on x86).

Actually, I'm pretty sure the difference is caused by the libgcc call 
that is generated for the 64-bit "%". __moddi3() IIRC.

>But the same test with on IBM's JDK shows it runs _faster_
>with long's than int's.  What optimization could they possibly be using?

This was not the case when I tried it. However, the IBM JDK did produce 
dramatically faster code for "long" than either GCJ or the Sun JDK.



More information about the Java mailing list