Strength reduction for loop-invariant types

  • Authors:
  • Phung Hua Nguyen;Jingling Xue

  • Affiliations:
  • University of New South Wales, Sydney, NSW, Australia;University of New South Wales, Sydney, NSW, Australia

  • Venue:
  • ACSC '04 Proceedings of the 27th Australasian conference on Computer science - Volume 26
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Types are fundamental for enforcing levels of abstraction in modern high-level programming languages and their lower-level representations. However, some type-related features such as dynamic method calls and dynamic type casts can contribute substantially to the performance of a program. Loop-invariant type is a concept relating to an object whose dynamic type never changes inside a loop. In this case, operations on the type of the object may be redundant in the loop. As these operations often cause exceptions, existing redundancy elimination techniques usually fail to optimise them. This paper proposes a new approach to reducing the cost of two important operations on loop-invariant types: method tests and dynamic type checking. We demonstrate its usefulness and benefit in IBM's Jikes RVM, a dynamic compilation system for Java.