The NINJA Project: Making Java Work for High Performance Numerical Computing

Copyright [©] (2001) by Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distrubuted for profit or commericial advantage. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee.

When Java(TM) was first introduced, there was a perception (properly founded at the time) that its many benefits came at a significant performance cost. In few areas were the performance deficiencies of Java so blatant as in numerical computing. Our own measurements, with second-generation Java virtual machines, showed differences in performance of up to one hundred-fold relative to C or Fortran. The initial experiences with such poor performance caused many developers of high performance numerical applications to reject Java out-of-hand as a platform for their applications. Despite the rapid progress that has been made in the past few years, the performance of commercially available Java platforms is not yet on par with state-of-the-art Fortran and C compilers. Programs using complex arithmetic exhibit particularly bad performance. Furthermore, current Java platforms are incapable of automatically applying important optimizations for numerical code, such as loop transformations and automatic parallelization. Nevertheless, our thesis is that there are no technical barriers to high performance computing in Java. To prove this thesis, we have developed a prototype Java environment, called Numerically INtensive JAva (NINJA), which has demonstrated Fortran-like performance can be obtained by Java on a variety of problems. We have successfully addressed issues such as dense and irregular matrix computations, calculations with complex numbers, automatic loop transformations, and automatic parallelization. Moreover, our techniques are straightforward to implement, and allow reuse of existing optimization components already deployed by software vendors for other languages, lowering the economic barriers to Java's acceptance. The next challenge for numerically intensive computing in Java is convincing developers and managers in this domain that Java's benefits can be obtained with performance comparable with highly tuned Fortran and C. This treatise contributes to overcoming that challenge. Once it is accepted that Java performance is only an artifact of particular implementations of Java, and that there are no technical barriers to Java achieving excellent numerical performance, our techniques will allow vendors and researchers to quickly deliver high performance Java platforms to program developers.

By: Jose E. Moreira, Samuel P. Midkiff, Manish Gupta, Pedro V. Artigas (CMU), Peng Wu (Univ. of Ill., Urbana-Champaign), George Almasi (Univ. of Ill., Urbana-Champaign)

Published in: Communications of the ACM, volume 44, (no 10), pages 102-9 in 2001

LIMITED DISTRIBUTION NOTICE:

This Research Report is available. This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and specific requests. After outside publication, requests should be filled only by reprints or legally obtained copies of the article (e.g., payment of royalties). I have read and understand this notice and am a member of the scientific community outside or inside of IBM seeking a single copy only.

RC21971.pdf

Questions about this service can be mailed to reports@us.ibm.com .