Ahead of time compiler solutions

Tom Tromey tromey@redhat.com
Wed Nov 13 12:17:00 GMT 2002


>>>>> "Philippe" == Philippe Laporte <plaporte@wgate.com> writes:

Philippe> I am currently investigating precompiling the core class
Philippe> libraries to native for the (God forbid) SUN JDK.

You won't be able to do this.  gcj doesn't, and probably can't,
interoperate with the JDK.

Philippe> How hard would it be to have gcj generate code for the SUN VM 1.4.1?

>From very difficult to impossible.

Philippe> I'm new to the topic, but is the idea of a bridge interface
Philippe> between VMs and Ahead of time compilers crazy? Is it
Philippe> conceivable?

This is a different question.  We know it is possible, since libgcj
includes its own VM.

Bridging to an arbitrary VM could perhaps be done by generating code
that calls out to JNI.  That would probably eliminate your performance
gains from compilation.

Philippe> I know it has been done with Kaffe, I've seen it running
Philippe> when I was at Transvirtual. BTW, has GCJ subsumed Kaffe and
Philippe> Classpath yet?

No.  libgcj and Classpath have merged code bases, more or less.  They
share a lot of code, and this amount generally increases over time.

gcj will probably never subsume kaffe for licensing reasons.
Eventually we hope somebody will write a JIT for libgcj.  Meanwhile we
limp along with our interpreter.

Philippe> It's a complete system now, right?

Yes.

Philippe> It's hard to imagine GCJ not outperforming the old Kaffe in
Philippe> all contexts...

As far as I know, it does.  Here is a performance comparison of many
java systems:

    http://www.shudo.net/jit/perf/

We still have room for improvement.  We've never made a concerted
effort to improve performance.

Tom



More information about the Java mailing list