Thin Guards: A Simple and Effective Technique for Reducing the Penalty of Dynamic Class Loading

  • Authors:
  • Matthew Arnold;Barbara G. Ryder

  • Affiliations:
  • -;-

  • Venue:
  • ECOOP '02 Proceedings of the 16th European Conference on Object-Oriented Programming
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Dynamic class loading is an integral part of the Java驴 programming language, offering a number of advantages such as lazy class loading and dynamic installation of software components. Unfortunately, these advantages often come at the cost of decreased performance because certain optimizations become more difficult to perform when an optimizing compiler cannot assume that it has seen the whole program. This paper introduces thin guards, a simple but effective technique that uses lightweight runtime tests to identify regions of code within which speculative optimizations can be performed. One application of thin guards is described in detail, demonstrating how they can be used to perform speculative inlining in the presence of dynamic class loading. Our experimental evaluation shows that when used in combination with other traditional compiler optimizations, thin guards can eliminate most of the penalty of dynamic class loading. Performance improvements of up to 27% are observed, eliminating up to 92% of the penalty imposed by dynamic class loading.