|Java compiler optimizations? firstname.lastname@example.org (suganya) (2001-01-04)|
|Re: Java compiler optimizations? email@example.com (2001-01-05)|
|Re: Java compiler optimizations? firstname.lastname@example.org (Zhiyong Wang) (2001-01-09)|
|Re: Java compiler optimizations? C.vanReeuwijk@twi.tudelft.nl (Kees van Reeuwijk) (2001-01-09)|
|Re: Java compiler optimizations? email@example.com (Eliot Miranda) (2001-01-09)|
|Re: Java compiler optimizations? firstname.lastname@example.org (2001-01-11)|
|Re: Java compiler optimizations? email@example.com (Eliot Miranda) (2001-01-18)|
|From:||Kees van Reeuwijk <C.vanReeuwijk@twi.tudelft.nl>|
|Date:||9 Jan 2001 23:20:34 -0500|
|Organization:||Delft University of Technology|
|Posted-Date:||09 Jan 2001 23:20:34 EST|
On 5 Jan 2001 14:07:01 -0500, firstname.lastname@example.org (Ian L. Kaplan) wrote:
>In article suganya <email@example.com> wrote:
>>What are the differences between the java compiler optimizations & other
>>compiler optimizations? And also give related sites and materials
>>available if so.
> For a given class of compiler, I suspect that there is no difference
> between Java optimization and C++ optimization, for example.
> Because of the doctrinaire approach that Sun takes to Java, "Java
> compiler" usually means a compiler that generates JVM code.
> The optimizations that are done for JVM code would be different, in
> some cases, from native code optimizations (e.g., some optimizations
> would be tarted at the stack nature of the code). But a Java
> compiler that generated native code would optimize code in a similar
> way to a native C++ compiler.
Speaking as the implementor of a Java (plus extensions) static
compiler, I can only partly agree. There obviously is significant
overlap with C++ optimizations, but there are some peculiarities of
Java that influence the optimizations that can be done and that must
On the negative side, Java has null pointer exceptions, array bound
exceptions, some oddments about static class initialization, and
garbage collection. All of these features require optimization, or
they would dominate execution times in a significant set of programs.
Then there is the strictly defined evaluation order, and the fact that
the language has threads; both hamper optimization in some cases.
On the positive side, Java has no pointer arithmetics, and restricted
pointer casting, which allows analyzers to be quite a bit less
And I think that Java programs tend to be coded in a different style
from C++, which also has some impact.
Return to the
Search the comp.compilers archives again.