13.10.2014 Views

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

135<br />

Figure 7.1: Two Bytecodes and their Equivalent Multicode<br />

will have n bytes devoted to representing the opcodes. Consequently, n − 1 bytes are<br />

saved for each multicode substitution performed.<br />

This size change is illustrated in Figure 7.1. It shows that a total of 5 bytes (2 opcodes<br />

and 3 operands) were used to represent the bytecode sequence aload getfield<br />

before multicode substitution was performed. When the sequence is replaced with a<br />

multicode, the total number of bytes is reduced to 4 because the number of opcodes<br />

is reduced to one. More significantly, the code will execute more efficiently because<br />

of the removal of a transfer of control, as will be seen in the following sections.<br />

7.2.1 Notation<br />

The symbol x k will be used to denote the codelet for a single Java bytecode. The<br />

symbol k is an integer greater than 0 used to indicate the position of that codelet<br />

within a bytecode sequence or a multicode. The work necessary to transfer control

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!