This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Java and Numerical Computing Ronald F. Boisvert Jose Moreira Michael Philippsen Roldan Pozo 1 Introduction We start this article by asking: Does Java have a role to play in the world of numerical computing? We strongly believe so. Java has too much to offer to be ignored. First of all, Java is portable at both the source and object format levels. The source format for Java is the text in a .java file. The object format is the bytecode in a .class file. Either type of file is expected to behave the same on any computer with the appropriate Java compiler and Java virtual machine. Second, Java code is safe to the host computer. Programs (more specifically, applets) can be executed in a sandbox environment that prevents them from doing any operation (such as writing to a file or opening a socket) which they are not authorized to do. The combination of portability and safety opens the way to a new scale of web-based global computing , in which an application can run distributed over the Internet [ ? ]. Third, Java implements a simple object-oriented model with important features ( e.g. , single inheritance, garbage collection) that facilitate the learning curve for newcomers. But the most important thing Java has to offer is its pervasiveness, in all aspects. Java runs on virtually every platform Universities all over the world are teaching Java to their students. Many specialized class libraries, from three-dimensional graphics to online transaction processing, are available in Java. With such universal availability and support, it only makes sense to consider Java for the development of numerical applications. Indeed, a growing community of scientists and engineers developing new appli- cations in Java has been slowly developing. A rallying point for this community has been the Java Grande Forum ( http://www.javagrande.org ) (see sidebar). There are some difficulties, though, with the wide-scale adoption of Java as a language for numerical computing. Java, in its current state of specification and level of implementation, is probably quite adequate for some of the GUI, postprocessing, and coordination components of a large numerical application. It fails, however, to provide some of the features that hard-core numerical programmers have grown accustomed to, such as complex numbers and true multidimensional arrays. Finally, as any language that caters to programmers of numerical applications, Java has to pass the critical test: its performance on floating-point intensive code must be (at least) on par with the incumbents C and Fortran. 2 The Performance of Java A common reaction of numerical programmers when first confronted with the thought of using Java for their code is But Java is so slow! Indeed, when the first Java virtual machines appeared, they worked by strictly interpreting the bytecode in .class files, and delivered very poor performance. Some people reported Java programs running up to 500 times slower than the equivalent C or Fortran codes.programs running up to 500 times slower than the equivalent C or Fortran codes....
View Full Document
This note was uploaded on 04/29/2010 for the course CS 5503 taught by Professor Kaylor during the Spring '10 term at W. Alabama.
- Spring '10
- Computer Science