Java, the new object-oriented programming language from Sun
Microsystems, appears to be setting the standard for universal
software development. Java code compiles into a binary format called
bytecode which can be used for software distribution, and which does
not need recompilation in order to run on any platform. Java is also
secure, guarding against code corruption before execution. This new
language uses run-time resolution to locate objects and their
corresponding classes, meaning software updates can be integrated as
quickly as they are made available. However, there are several
trade-offs and costs involved in migrating to a universal software
distribution environment.
Currently there are four approaches to running Java: an interpreter, a
Just-In-Time (JIT) compiler, a Native Executable Translation (NET)
compiler, and a hardware implementation. In this article we present
our initial prototyping experience with our NET compiler, an
optimizing Java-bytecode-to-native-machine-code translator. The
objective of this work is to run the translated code at nearly the
full performance of native code directly generated from a source
representation such as the C/C++ programming languages. However, the
work with our NET compiler is not limited to Java. Our goal is to
develop a strong portfolio of techniques from our Java implementation
efforts that will contribute to the development and acceptance of any
universal software distribution language.
We focus our discussion on the critical issues involved in the design
of our NET compiler, including minimizing verification overhead,
mapping the stack computation model of the bytecode virtual machine to
the register computation model of modern processors and developing a
more efficient memory organization. We also explain some of the less
intuitive costs involved in running Java. Preliminary results show
that our optimizing NET compiler is currently capable of achieving
better performance than the other bytecode execution methods, in some
cases achieving speeds comparable to directly compiled native code.