Kamandi,
At Tuesday 31 August 2004 09:36 in comp.lang.java.softwaretools KAMANDI
wrote:
> Do you know -server option of the standard compiler javac ?
> It seem make file execute very fast, why ?
Quoting <URL:
http://java.sun.com/products/hotspot/docs/whitepaper/Java_Hotspot_v1.4.1/Java_HS
pot_WP_v1.4.1_1002_4.html>
"Java HotSpot Client Compiler
"The Java HotSpot Client Compiler is a simple, fast three-phase compiler.
In the first phase, a platform-independent front end constructs a
high-level intermediate representation (HIR) from the bytecodes. In the
second phase, the platform-specific back end generates a low-level
intermediate representation (LIR) from the HIR.
"The final phase does peephole optimization on the LIR and generates
machine code from it. Emphasis is placed on extracting and preserving as
much information as possible from the bytecodes. It focuses on local code
quality and does very few global optimizations, since those are often the
most expensive in terms of compile time. It supports inlining any
function that has no exception handlers or synchronization, and also
supports deoptimization for debugging and inlining.
"Java HotSpot Server Compiler
"The server compiler is tuned for the performance profile of typical
server applications. The Java HotSpot Server Compiler is a high-end fully
optimizing compiler. It uses an advanced static single assignment
(SSA)-based IR for optimizations. The optimizer performs all the classic
optimizations, including dead code elimination, loop invariant hoisting,
common subexpression elimination, and constant propagation. It also
features optimizations more specific to Java technology, such as
null-check and range-check elimination. The register allocator is a
global graph coloring allocator and makes full use of large register sets
that are commonly found in RISC microprocessors. The compiler is highly
portable, relying on a machine description file to describe all aspects
of the target hardware. While the compiler is slow by JIT standards, it
is still much faster than conventional optimizing compilers. And the
improved code quality pays back the compile time by reducing execution
times for compiled code. The server compiler performs full inlining and
full deoptimization."
See the same page for the /deoptimization/ process mentioned in these
paragraphs.
Randall Schulz