next up previous
Next: Parallelism. Up: Java and High-Performance Computing Previous: User Base.

Performance.

Performance is arguably a critical issue for Java. However, there seems little reason why native Java compilers, as opposed to current portable JavaVM interpreters or ``just in time" (JIT) compilers, cannot obtain performance comparable with that of C or Fortran compilers. One difficulty in compiling Java is its rich exception framework, which could restrict compiler optimizations: users would need to avoid complex exception handlers in performance-critical portions of a code. Another important issue with Java is the lack of any operator overloading, which could allow efficient elegant handling of Fortran constructs like COMPLEX. Much debate centers on Java's rule that code not only must run everywhere but must give the same value on all machines. This rule inhibits optimization on machines such as the Intel Pentium that include multiple add instructions with intermediate results stored to higher precision than final values of individual floating-point operations.

An important feature of Java is the lack of pointers. Their absence allows much more optimization for both sequential and parallel codes. Optimistically, one can say that Java shares the object-oriented features of C++ and the performance features of Fortran. An interesting area is the expected performance of Java interpreters (using JIT techniques) and compilers on the Java bytecodes (virtual machine). Currently, a PC just in time compiler shows a factor of 3-10 lower performance than C-compiled code, and this can be expected to decrease to a factor of 2. Hence, with some restrictions on programming style, we expect Java language or VM compilers to be competitive with the best Fortran and C compilers. We also expect a set of high-performance ``native-class'' libraries to be produced, which can be downloaded and accessed by applets to improve performance in the usual areas one builds scientific libraries.



Theresa Canzian
Fri Mar 13 01:17:33 EST 1998