Local redundant polymorphism query elimination

  • Authors:
  • Rhodes H. F. Brown;R. Nigel Horspool

  • Affiliations:
  • University of Victoria;University of Victoria

  • Venue:
  • Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Dynamic polymorphism is a powerful yet costly feature of object-oriented programming languages. To improve performance, several techniques have been developed to simplify or remove polymorphism operations when they are not needed. However, these techniques have little effect on sites that are actively polymorphic. In this paper we present an alternate approach to the optimization of operations such as virtual dispatches and type tests. Rather than attempt to eliminate the polymorphism mechanism, we identify situations where resolved type and method information can be shared across multiple polymorphism operations. In short, we perform a partial redundancy elimination transform over the loads and tests that constitute polymorphism queries. We describe the realization of our technique in the Jikes RVM and present its effects on the DACAPO and SPECJVM98 benchmarks. Rigorous measurements show a mean improvement, including several statistically significant results, over a configuration with no dispatch optimization and over one that employs guarded inlining. We underscore the potential of our approach by demonstrating speedups of up to 14% on a highly polymorphic benchmark. Our results show the approach is both successful and complementary to techniques that focus on degenerate polymorphism.