Java static compilation performance considerations

You can determine the speed of transformation by the optimization level that you set.

Optimization level 10 transforms the fastest, but the resulting program is generally slower than one set at a higher optimization level. Optimization level 40 takes longer to transform, but is likely to run faster.

A small number of Java™ programs may not optimize to level 40. Thus, a few programs that do not run at level 40, may run at level 30 instead. You can run programs that do not run at optimization level 40 by using licensed internal code optimization LICOPT parameter strings. However, performance at level 30 may be sufficient for your program.

If you are having problems running Java code that seemed to work on another Java virtual machine, try using optimization level 30 instead of level 40. If this works, and your performance is acceptable, you do not need to do anything else. If you need better performance, see LICOPT parameter strings for information on how to enable and disable various forms of optimization. For example, you could first try creating the program using OPTIMIZE(40) LICOPT(NoPreresolveExtRef). If your application contains dead calls to classes that are not available, this LICOPT value allows your program to run without problems.

To determine what level of optimization your Java programs were created at, you can use the Display Java Program (DSPJVAPGM) command. To change the optimization level of your Java program, use the Create Java Program (CRTJVAPGM) command.