<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Peephole optimization - Page 3 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=peephole_optimization&amp;p=2">1.Previous</a><br />
<a accesskey="3" href="page.php?w=peephole_optimization&amp;p=4">3.Next</a>
</p>
<p>for special operand cases.<br/>
* Address-mode operations - use address modes to simplify code.</p>

<p><big>Implementation</big></p>
<p>Modern compilers often implement peephole optimizations with a <a href="page.php?w=pattern-matching">pattern-matching</a> <a href="page.php?w=algorithm">algorithm</a>.</p>

<p><big>Examples</big></p>
<p><big>Replacing slow instructions with faster ones</big></p>
<p>The following <a href="page.php?w=Java_bytecode">Java bytecode</a>:</p>

<p> aload 1 aload 1 mul</p>

<p>can be replaced with the following, which executes faster:</p>

<p> aload</p><p>
<a accesskey="1" href="page.php?w=peephole_optimization&amp;p=2">1.Previous</a><br />
<a accesskey="3" href="page.php?w=peephole_optimization&amp;p=4">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
