Abstract
Although there has been some experimentation with Java as a language for numerically intensive computing, there is a perception by many that the language is not suited for such work. In this paper we show how optimizing array bounds checks and null pointer checks creates loop nests on which aggressive optimizations can be used. Applying these optimizations by hand to a simple matrix-multiply test case leads to Java compliant programs whose performance is in excess of 500 Mflops on an RS/6000 SP 332MHz SMP node. We also report in this paper the effect that each optimization has on performance. Since all of these optimizations can be automated, we conclude that Java will soon be a serious contender for numerically intensive computing.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
J. M. Asuru. Optimization of array subscript range checks. ACM Letters on Programming Languages and Systems, 1(2):109–118, June 1992.
C. A. Atwood, R. P. Garg, and D. DeRyke. A prototype computational fluid dynamics case study in Java. Concurrency, Pract. Exp. (UK), 9(11):11–18, November 1997. Java for Computational Science and Engineering-Simulation and Modeling IILas Vegas, NV, USA21 June 1997.
U. Banerjee. Unimodular transformations of double loops. In Proc. Third Workshop on Programming Languages and Compilers for Parallel Computing, Irvine, CaliforniaAugust 1990.
A. Bik and D. Gannon. javab manual (version 1.0 BETA. In ACM 1998 Workshop on Java for High Performance Network Computing. ACM SIGPLAN, 1998. Available at URL http://www.cs.ucsb.edu/conferences/java98.
A. Bik, J. Villacis, and D. Gannon. javar: A prototype Java restructuring compiler. Concurrency, Pract. Exp. (UK), 9(11):81–91, November 1997. Java for Computational Science and Engineering-Simulation and Modeling IILas Vegas, NV, USA21 June 1997.
R. F. Boisvert, J. J. Dongarra, R. Pozo, K. A. Remington, and G. W. Stewart. Developing numerical libraries in Java. In ACM 1998 Workshop on Java for High-Performance Network Computing. ACM SIGPLAN, 1998. Available at http://www.cs.ucsb.edu/conferences/java98.
Z. Budimlic and K. Kennedy. Optimizing Java: Theory and practice. Concurrency, Pract. Exp. (UK), 9(11):45–63, November 1997. Java for Computational Science and Engineering-Simulation and Modeling IILas Vegas, NV, USA21 June 1997.
D. Callahan, S. Carr, and K. Kennedy. Improving register allocation for subscripted variables. In Proc. ACM SIGPLAN’ 90 Conference on Programming Language Design and Implementation, White Plains, NY, June 1990.
H. Casanova, J. Dongarra, and D. M. Doolin. Java access to numerical libaries. Concurrency, Pract. Exp. (UK), 9(11):79–91, November 1997. Java for Computational Science and Engineering-Simulation and Modeling IILas Vegas, NV, USA21 June 1997.
IBM Corporation. IBM High Performance Compiler for Java, 1997. Available for download at http://www.alphaWorks.ibm.com/formula.
P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the 4’th ACM Symposium on Principles of Programming Languages, pages 238–252, January 1977.
P. Cousot and N. Halbwachs. Automatic discovery of linear restraints among variables of a program. In Conference Record of the 5’th ACM Symposium on Principles of Programming Languages, pages 84–96, January 1978.
P. Cousot and N. Halbwachs. Automatic proofs of the absence of common run-time errors. In Conference Record of the 5’th ACM Symposium on Principles of Programming Languages, pages 105–118, January 1978.
J. J. Dongarra, I. S. Duff, D. C. Sorensen, and H. A. van der Vorst. Solving Linear Systems on Vector and Shared Memory Computers. Society for Industrial and Applied Mathematics, 1991.
J. Ferrante, V. Sarkar, and W. Thrash. On estimating and enhancing cache effectiveness. In Proc. Fourth Workshop on Programming Languages and Compilers for Parallel Computing, August 1991.
Java Grande Forum. Issues in numerical computing with Java. Document available at URL http://math.nist.gov/javanumerics/issues.html, March 1998.
James Gosling. The evolution of numerical computing in Java. Document available at Web-page http://java.sun.com/people/jag/FP.htm. Sun Microsystems.
James Gosling, Bill Joy, and Guy Steele. The Java(â„¢) Language Specification. Addison-Wesley, 1996.
R. Gupta. A fresh look at optimizing array bounds checking. In Proceedings of the ACM SIGPLAN’ 90 Conference on Programming Language Design and Implementation, pages 272–282, June 1990.
R. Gupta. Optimizing array bound checks using flow analysis. ACM Letters on Programming Languages and Systems, 2(1-4):135–150, March-December 1993.
W. H. Harrison. Compiler analysis for the value ranges for variables. IEEE Transactions on Software Engineering, SE3(3):243–250, May 1977.
International Business Machines Corporation. IBM Engineering and Scientific Subroutine Library for AIX — Guide and Reference, December 1997.
P. Kolte and M. Wolfe. Elimination of redundant array subscript range checks. In Proceedings of the ACM SIGPLAN’ 95 Conference on Programming Language Design and Implementation, pages 270–278, Jun 1995.
V. Markstein, J. Cocke, and P. Markstein. Elimination of redundant array subscript range checks. In Proceedings of the ACM SIGPLAN’ 82 Conference on Programming Language Design and Implementation, pages 114–119, June 1982.
Sun Microsystems. Sun proposes modification to Java programming languages’s floating point specification. http://www.sun.com/smi/Press/sunflash/9803/sunflash.980324.17.html, 1998.
S. P. Midkiff, J. E. Moreira, and M. Gupta. Method for optimizing array bounds checks in programs. Patent pending, IBM Docket #YO-998-052, filed with U. S. Patent Office, April 24th, 1998.
S. P. Midkiff, J. E. Moreira, and M. Snir. Optimizing bounds checking in java programs. IBM Systems Journal, 37(3):409–453, August 1998.
J. E. Moreira, S. P. Midkiff, and M. Gupta. From flop to megaflops: Java for technical computing, 1998. Submitted to ACM TOPLAS, IBM Research Report 21166.
D. Orchard. Better peformance with exceptions in Java. Byte, pages 53–54, March 1998. In the Core Programming feature.
V. Sarkar. Automatic selection of high-order transformations in the IBM XL Fortran compilers. IBM Journal of Research and Development, 41(3), May 1997.
M. Schwab and J. Schroeder. Algebraic java classes for numerical optimization. In ACM 1998 Workshop on Java for High-Performance Network Computing. ACM SIGPLAN, 1998. Available at http://www.cs.ucsb.edu/conferences/java98.
B. Schwarz, W. Kirchgassner, and R. Landwehr. An optimizer for Ada-design, experience and results. In Proceedings of the ACM SIGPLAN’ 88 Conference on Programming Language Design and Implementation, pages 175–185, June 1988.
V. Seshadri. IBM high performance compiler for Java. AIXpert Magazine, September 1997. Electronic publication available at URL http://www.developer.ibm.com/library/aixpert.
Proposal for extension of java floating point in jdk 1.2. http://java.sun.com/feedback/fp.html, 1998.
M. E. Wolf and M. S. Lam. A loop transformation theory and an algorithm to maximize parallelism. IEEE Transactions on Parallel and Distributed Systems, 2(4):452–471, October 1991.
M. J. Wolfe. Iteration space tiling for memory hierarchies. In Proc. 3rd SIAM Conference on Parallel Processing for Scientific Computing, pages 357–361, Philadelphia, PA, 1987.
M. J. Wolfe. Optimizing Supercompilers for Supercomputers. The MIT Press, 1989.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Moreira, J.E., Midkiff, S.P., Gupta, M. (1999). From Flop to MegaFlops: Java for Technical Computing. In: Chatterjee, S., et al. Languages and Compilers for Parallel Computing. LCPC 1998. Lecture Notes in Computer Science, vol 1656. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48319-5_1
Download citation
DOI: https://doi.org/10.1007/3-540-48319-5_1
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66426-0
Online ISBN: 978-3-540-48319-9
eBook Packages: Springer Book Archive