| In general, the performance of Java programs relative to programs 
              in other languages carrying out the same tasks has improved considerably 
              since Java first appeared. The early JVMs did straight-forward interpretation 
              of the Java bytecode. This put the Java programs at a disadvantage 
              compared to programs that had been compiled from, say, C/C++ into 
              local machine code. Subsequently, however, the JVMs became much 
              more sophisticated and used techniques such as Just-in-Time compilation 
              and adaptive techniques to convert bytecode on the fly into local 
              machine code. This provides performance similar to that of compiled 
              language programs in many cases, especially where particular sections 
              of code, e.g. loops, are executed repeatedly. See the sections in Chapter 1 where we discussed the JVM: Chapter 1: Tech: 
              Shortcomings discusses problems with the language that limit 
              performance on some kinds of mathematical operations such as those 
              with large arrays.   We provide here a list of links to Java 
              benchmarks and performance studies with them.  See the following pages for discussions and demos of Java performance: 
             If Java cannot perform a mathematical task to the speed required 
              but the Java GUI and networking capabilities are still desired, 
              it is possible to connect a Java program to a C/C++ computation 
              engine using the Java Native Interface (JNI) techniques discussed 
              in Chapter 22. 
             Most recent update: Oct. 18, 2005 |