This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: another compiler better than gcj ?
Bryce wrote:
> Yeah. The Sieve.java case is most interesting because its just a loop
> with no allocation, no type checks, etc, so in theory the Java code
> should be just as fast as a C equivilant if you use --no-bounds-checks.
I looked at another sieve routine (in Primes.java), and it does things like
division by two in the inner loop. On x86 Linux we currently emit calls to
_Jv_divI when we could safely just emit a shift insn. I'm running make check
right now with a patch to help improve this.
> Taking a quick look at the generated .s files it looked to me as if the
> Manta compiler was simply managing to compile the loop into fewer and
> more efficient instructions than GCJ could.
Well, gcj has lots of knobs to twiddle (alignment, code size, etc). Did you
just try -O3?
> Its also very interesting
> that GCJ 3.1 is nearly twice as fast as 3.0.2.
Cool!
AG