11 research outputs found
Compiling Java for high performance and the Internet
Java is the first widely accepted language that addresses heterogeneous resources, security, and portability problems, making it attractive for scientific computation. It also encourages programmers to use object-oriented techniques in programming. Unfortunately, such object-oriented programs also incur unacceptable performance penalties. For example, using a polymorphic number hierarchy in a linear algebra package resulted in a code that is four times shorter, more extensible and less bug-prone than the equivalent Fortran-style code, but also many times slower.
To address the poor performance problem, this dissertation introduces several new compilation techniques that can improve the performance of scientific Java programs written in a polymorphic, object oriented style to within a factor of two of the equivalent hand-coded Fortran-style programs. These techniques also maintain an acceptable level of Java byte-code portability and flexibility, thus rewarding, rather than penalizing, good object-oriented programming practice.
This dissertation first discards the typical one-class-at-a-time Java compilation model for a whole-program model. It then introduces two novel whole-program optimizations, class specialization and object inlining, which improve the performance of high-level, object-oriented, scientific Java programs by up to two orders of magnitude, effectively eliminating the penalty of object-oriented design.
Next, this dissertation introduces a new Almost-whole-program compilation model. This model improves the flexibility of the generated code, while still permitting whole-program optimizations and incurring only modest performance penalties. It enables the programmer balance performance and flexibility of the program after the development phase, instead of compromising the design for performance.
Furthermore, this dissertation reduces the restrictions that Java imposes upon classical optimization techniques by introducing exception hiding and SSA conversion algorithms. Exception hiding transforms the code to create exception-free zones, in which code motion transformations can move the code without restraint. The new, nearly linear-time SSA-to-CFG conversion algorithm considerably reduces the number of copies inserted in the conversion process, improving the effectiveness of classical optimizations.
Finally, this dissertation lays the groundwork for further research, particularly for fast register allocation, precise type analysis, coordinated compilation, and exception recovery
Almost-Whole-Program Compilation
This paper presents the motivation and an implementation strategy for a new almost-whole-program compilation framework for Java programs. This framework improves the flexibility of the generated code, while still permitting whole-program optimizations and incurring only modest performance penalties. It enables the programmer to balance performance and exibility of the program after the development phase, instead of compromising the design process for the sake of performance
Static interprocedural optimizations in Java
Interprocedural optimizations are important in Java because the object-oriented programming style encourages the use of many small methods. Unfortunately, such optimizations are difficult because of the nature of language structure and its security restrictions. A particular problem is the � difficulty of knowing the entire program at any time prior to execution. This paper presents new approaches to cloning and inlining that can be profitably used even in a single class. These optimizations are of particular interest for concurrent environments, since the correctness of their application is insensitive to concurrency. Results from our preliminary implementation are presented and ways to extend these methods are described. These methods can be thought of as strategies for almost � whole-program analysis and optimization. Because Java encourages a programming style that uses many small methods, interprocedura