Loop-invariant code motion: Difference between revisions

Content deleted Content added
Appraiser (talk | contribs)
clean up using AWB
remove incorrect (and irrelevant) further optimization
Line 18:
j = j + calcval;
}</pre></code>
 
This can then be further optimized, leading to less overall executed code for larger values of maxval and/or smaller values of calcval.
 
<code><pre>
int calcval = (4+array[k])*pi+5;
j = j + integer_part((maximum - 1 - j) / calcval) * calcval;
</pre></code>
 
[[Category:Compiler optimizations]]