The currently supported optimization settings are:
-1
Interpretive mode is always used. The compilation time is minimized at the expense of runtime performance. No class files are generated, which may improve memory usage depending on your system.
If the optimization package is not available, then optimization acts as if it is always -1.
0
No optimizations are performed. The bytecode compiler runs fastest in this mode, but the generated byte code is less efficient.
1-9
All optimizations are performed. Simple data & type flow analysis is performed to determine which JavaScript variables can be allocated to Java VM registers, and which variables are used only as Numbers. Local common sub-expressions are collapsed (currently this only happens for property lookup, but in the future more expressions may be optimized). All local variables and parameters are allocated to Java VM registers. Function call targets are speculatively pre-cached (based on the name used in the source) so that dispatching can be direct, pending runtime confirmation of the actual target. Arguments are passed as Object/Number pairs to reduce conversion overhead.
Note: