another compiler better than gcj ?

Andrew Haley aph@cambridge.redhat.com
Wed Oct 24 05:58:00 GMT 2001


Bryce McKinlay writes:
 > Anthony Green wrote:
 > 
 > >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.
This should never happen -- the divide overflow handler can cope with
any cases that generate an overflow at runtime. If we can't resolve a
case of division by a constant at compile time because it might
overflow we should do the division at runtime and let the exception
handler do the right thing. In any case there's never a good cause to
call _Jv_divI.
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /