1. For jobs that run in a fixed amount of time, choose the compiler based on which
one is the fastest at executing the actual job.
2. Tiered compilation provides a reasonable default choice for batch jobs.
Optimizing Long-Running Applications
Finally, there is the difference that can be expected in the eventual performance of a long-
running application when different compilers are used. Performance of long-running applica-
tions is typically measured by examining the throughput that an application delivers after it
has been “warmed up”—meaning after it has run long enough that the important parts of the
code have been compiled.
This example uses the basic stock calculator and puts it in a servlet; each call to the servlet
will retrieve information for a random stock symbol for a period of 25 years. Using the fhb
produced after warm-up periods of 0, 60, and 300 seconds.
Table 4-3. Throughput of server applications
Warm-up period -client
15.87 23.72 24.23
16.00 23.73 24.26
16.85 24.42 24.43
The measurement period here is 60 seconds, so even in the case where there is no warm-up,
the compilers had an opportunity to get enough information to compile the hot spots; hence
the server compilers are always better in this example. (Also, a lot of code was compiled dur-
ing the startup of the application server.) As before, tiered compilation can compile just a
little bit more code and squeeze out just a little more performance than the server compiler