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.

117<br />

these data types in the list of least frequently executed bytecodes is not surprising.<br />

The int data type provides sufficient range for the storage of many of the integer<br />

values used in a program. Long integers are generally avoided unless necessary due<br />

to their increased storage requirements and poorer execution performance on many<br />

platforms.<br />

Many Java programmers elect to use double precision floating point numbers<br />

rather than single precision floating point numbers. This is because single precision<br />

floats offer relatively limited precision and range. Although doubles take twice as<br />

much memory to store, their performance is comparable to single precision floats on<br />

many modern computer architectures.<br />

All of these factors contribute to the infrequent use of float and long data types.<br />

Consequently, few bytecodes are executed to handle values of those types. This<br />

further reinforces the recommendation to consider replacing many of the float and<br />

long load specialized bytecodes with additional specialized integer loads.<br />

The observant reader will also have noticed the presence of iload 0x03 in the<br />

list of least executed load instructions. The presence of this bytecode is surprising in<br />

that it is a despecialized form of what would normally be expressed as iload 3. It<br />

occurs statically in several of the class files used by the symjpack-t benchmark in the<br />

Ashes Suite. These class files were used in their precompiled, as distributed form. It<br />

is not known what compiler was used to create these class files or why the compiler<br />

elected to make use of iload 0x03 rather than the more common iload 3. It was<br />

observed that the iload 3 form is also present within the same class files and that<br />

all occurrences of the iload 0x03 form immediately precede an if icmplt bytecode.<br />

As a result it is possible that the use of iload 0x03 is an artifact of the technique<br />

used by one specific compiler when generating conditional branches.<br />

6.2.2 Local Variable Stores<br />

The distribution of the most frequently utilized store bytecodes was also examined.<br />

It revealed similar patterns to those found for load bytecodes. In particular, it was<br />

observed that general purpose store bytecodes occurred frequently among those store<br />

bytecodes executed with greatest frequency. While the most frequently executed<br />

store bytecode was istore 3, istore 0x04 was a close second. Only 4 of the 10<br />

most frequently executed store bytecodes were specialized. As was the case for load<br />

bytecodes, the proportion worsens as the number of bytecodes considered increases.<br />

When the top 20 store bytecodes are considered only 5 are found to be specialized

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

Saved successfully!

Ooh no, something went wrong!