another compiler better than gcj ?
Anthony Green
green@redhat.com
Tue Oct 23 21:12:00 GMT 2001
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
More information about the Java
mailing list