Optimizing array reference checking in Java programs

  • Authors:
  • S. P. Midkiff;J. E. Moreira;M. Snir

  • Affiliations:
  • -;-;-

  • Venue:
  • IBM Systems Journal
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

The JavaTM 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.