Annotating the Java bytecodes in support of optimization

Joseph Hummel, Ana Azevedo*, David Kolson, Alexandru Nicolau

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

26 Scopus citations

Abstract

The efficient execution of Java programs presents a challenge to hardware and software designers alike. The difficulty, however, lies with the Java bytecodes. Their model of a simplistic, platform-independent stack machine is well-suited for portability, though at the expense of execution speed. Various approaches are being proposed to increase the speed of Java byte-code programs, including: (i) on-the-fly compilation to native code (also known as JIT or 'just-in-time' compilation); (ii) traditional ('ahead-of-time') compilation of bytecodes to some higher-level intermediate form and then to native code; and (iii) translation of bytecodes to a higher-level language and then use of an existing compiler to produce native code. Speedups of the order of 50 over standard bytecode interpretation have been claimed. All of these approaches rely upon bytecode analysis (of varying sophistication) to extract information about the program, which is then used to optimize the native code during the translation process. However, extracting information from a lower-level representation such as the Java bytecodes can be very expensive. Also, given the fact that most approaches for executing Java bytecodes cannot spend a great deal of time recovering high-level information, the solutions adopted during the translation process must use faster and less accurate analysis techniques, thus penalizing the quality of the native code. In this paper we propose an optimization approach based on bytecode annotations. The bytecodes are annotated during the original source code to bytecode translation, allowing both traditional interpretation by a JVM and aggressive optimization by an annotation-aware bytecode compiler. Annotations hinder neither portability nor compatibility, while preserving optimization information that is expensive to recompute. Preliminary results yield bytecode with C-like performance using JIT technology.

Original languageEnglish (US)
Pages (from-to)1003-1016
Number of pages14
JournalConcurrency Practice and Experience
Volume9
Issue number11
DOIs
StatePublished - Nov 1997

ASJC Scopus subject areas

  • General Engineering

Fingerprint

Dive into the research topics of 'Annotating the Java bytecodes in support of optimization'. Together they form a unique fingerprint.

Cite this