Tranlating Java to C without Inserting Class Initialization Tests

  • Authors:
  • Yuji Chiba

  • Affiliations:
  • -

  • Venue:
  • IPDPS '02 Proceedings of the 16th International Parallel and Distributed Processing Symposium
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Although static compilation is one way of improving performance in Java, an enormous amount of effort is required to develop static compilers for the wide variety of platforms (i.e. processors and operating systems) used in embedded devices. We can decrease this development effort by using a Java2C translator, but this approach has a drawback in that we cannot employ platform-dependent techniques for optimizations, such as code-dispatching. This paper presents a portable optimization strategy focusing on class initialization tests in a Java2C translator. A class initialization test checks if a class has been initialized and initializes it if it hasn't. But this test becomes redundant after initialization of the class. We thus improve performance by removing it. In our system, the Java2C translator generates code without class initialization tests. The program is first executed with an interpreter at its start-up until the necessary classes have been initialized. Once class initialization is complete, we use statically compiled code to improve performance. We evaluated our strategy with the SPECjvm98 benchmark suite. Translation without inserting tests improved performance by 44.68%, while the overhead resulting from using an interpreter at the start-up of the program was less than 0.76%.