Optimizing array reference checking in Java programs

S. P. Midkiff, J. E. Moreira, M. Snir

Research output: Contribution to journalArticle

Abstract

The Java™ language specification requires that all array references be checked for validity. If a reference is invalid, an exception must be thrown. Furthermore, the environment at the time of the exception must be preserved and made available to whatever code handles the exception. Performing the checks at run time incurs a large penalty in execution time. In this paper we describe a collection of transformations that can dramatically reduce this overhead in the common case (when the access is valid) while preserving the program state at the time of an exception. The transformations allow trade-offs to be made in the efficiency and size of the resulting code, and are fully compliant with the Java language semantics. Preliminary evaluation of the effectiveness of these transformations shows that performance improvements of 10 times and more can be achieved for array-intensive Java programs.

Original languageEnglish (US)
Pages (from-to)409-452
Number of pages44
JournalIBM Systems Journal
Volume37
Issue number3
DOIs
StatePublished - 1998
Externally publishedYes

ASJC Scopus subject areas

  • Software
  • Theoretical Computer Science
  • Computer Science(all)
  • Information Systems
  • Computer Graphics and Computer-Aided Design
  • Computational Theory and Mathematics

Fingerprint Dive into the research topics of 'Optimizing array reference checking in Java programs'. Together they form a unique fingerprint.

  • Cite this