mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
69 lines
2.2 KiB
HTML
69 lines
2.2 KiB
HTML
|
<HTML>
|
||
|
<HEAD>
|
||
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||
|
<META NAME="Author" CONTENT="Norris Boyd">
|
||
|
<META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (WinNT; U) [Netscape]">
|
||
|
<TITLE>Optimization</TITLE>
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#FFFFFF">
|
||
|
|
||
|
<CENTER>
|
||
|
<H1>
|
||
|
Optimization</H1></CENTER>
|
||
|
|
||
|
<H2>
|
||
|
Optimization settings</H2>
|
||
|
<P>The currently supported optimization settings are:</P>
|
||
|
|
||
|
<P><B>-1</B>
|
||
|
|
||
|
<P><B></B>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.
|
||
|
<p>
|
||
|
If the optimization package is not available, then optimization acts as if it is always -1.
|
||
|
</P>
|
||
|
|
||
|
<P><B>0</B>
|
||
|
|
||
|
<P><B></B>No optimizations are
|
||
|
performed. The bytecode compiler runs fastest in this mode, but the generated byte code
|
||
|
is less efficient.</P>
|
||
|
|
||
|
<P><B>1-9</B>
|
||
|
|
||
|
<P>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.</P>
|
||
|
|
||
|
<P>Note:
|
||
|
<OL>
|
||
|
<LI>
|
||
|
Some language features (indirect calls to eval, use
|
||
|
of the arguments property of function objects) were previously not supported
|
||
|
in higher optimization levels. These features have been removed from the
|
||
|
language in ECMA, so higher optimization levels are now conformant.
|
||
|
|
||
|
<LI>
|
||
|
Future versions may allocate more aggressive
|
||
|
optimizations to higher optimization levels. For compatibility with future
|
||
|
versions, use level 1. For maximal optimization, use level 9, but retest
|
||
|
your application when upgrading to new versions.</LI>
|
||
|
</OL>
|
||
|
|
||
|
|
||
|
<P>
|
||
|
<HR WIDTH="100%">
|
||
|
<BR><A HREF="index.html">back to top</A>
|
||
|
<br>
|
||
|
</BODY>
|
||
|
</HTML>
|