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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

225<br />

revealed that none of the constraints were violated in practice. An analysis was<br />

also presented that showed that despecialization did not impact the correctness of<br />

exceptions or synchronization or have a negative impact on the ability to perform<br />

verification.<br />

The initial despecialization study was followed by a second study that was more<br />

comprehensive. While the first study considered seven benchmarks executed using<br />

three virtual machines running on a single platform, the second study considered<br />

20 benchmarks running on a total of eight virtual machine / computing platform<br />

combinations.<br />

The second study also considered grouping the despecializations in a different<br />

manner. In the first study, groups of despecializations were selected based on the<br />

similarity of their general purpose forms. The second study used profiling in order<br />

to determine the frequency of execution of each specialized bytecode. The despecializations<br />

were then performed from least frequently executed to most frequently<br />

executed. This system was used with the expectation that it would minimize the<br />

performance impact of the first despecializations performed. Measuring the performance<br />

of the applications confirmed that this was typically the case with the last few<br />

despecializations showing the majority of the performance loss.<br />

The overall results from the second study confirmed what was found in the first.<br />

When 62 specialized bytecodes were replaced with their equivalent general purpose<br />

forms, an average performance loss of 2.0 percent was observed. Performing approximately<br />

half of the despecializations showed a performance loss of only 0.6 percent.<br />

Evaluating the impact despecialization had on class file size showed that performing<br />

62 despecializations increased average class file size by approximately 3.5 percent<br />

without violating any of the constraints imposed by the Java Virtual Machine Specification.<br />

There are several reasons why specialized bytecodes have little impact on application<br />

performance. These include the fact that many modern virtual machines<br />

make use of a just-in-time compiler and the fact that some specialized bytecodes are<br />

executed extremely infrequently. A just-in-time compiler reduces the performance impact<br />

of specialized bytecodes because it is often possible to generate identical machine<br />

code during the compilation process for both a specialized bytecodes and its equivalent<br />

general purpose form. Thus, despecialization only impacts the performance of<br />

the application up until the point when just-in-time compilation is used.<br />

Infrequently executed specialized bytecodes also have little impact by their very<br />

nature. The difference in performance between the specialized and equivalent general

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

Saved successfully!

Ooh no, something went wrong!