previous up next print clean
Next: SUMMARY AND CONCLUSIONS Up: Schwab & Schroeder: A Previous: Why Java?

Why not Java?

Java is slow. Consequently, programs implemented in Java are slow. We have not done any serious performance measures, nor have we tried to finalize and optimize Jag. Standard Java is about 30-60 times slower than C when interpreted. When Java is compiled by a just-in-time compiler (jit), it seems to be about 3-6 times slower then C. Java compiler technology is improving rapidly, but how efficient it can get relative to other languages is unclear. Hank Schiffman Schiffman (1997) believes that Java's native code will be about as fast as C++ in most cases, but hardly ever faster.

For the time being, we find Java's just-in-time performance acceptable for prototyping small- to medium-sized problems. However, for large field data examples, we may have to re-implement our application in a better performing language, after we developed it in Java.

A different reason to shun Java is its current rapid growth and change. Java is not standardized and past releases changed sufficiently to require considerable reprogramming of already existing applications. In particular, Java's window toolkit, AWT, has been unreliable.

The development of Jag was not affected by changes in Java. In general, Jag relies on parts of Java that are traditional components of any computer language, such as arithmetic, string handling, stream IO, etc. We resisted the temptation to use more original Java features, such as its graphics and network capabilities. We hope, however, that soon we will be able to exploit these features as Java evolves and SUN begins to freeze the language's core. During the development of Jag, we changed between minor upgrades of Java without any complications. We developed our software on two platforms, Linux and SGI, without experiencing any portability problems. We are confident that the up-coming major upgrade to Java 1.1 will pose no problems for Jag.


previous up next print clean
Next: SUMMARY AND CONCLUSIONS Up: Schwab & Schroeder: A Previous: Why Java?
Stanford Exploration Project
11/11/1997