<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wcipeg.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Constant_optimization</id>
		<title>Constant optimization - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wcipeg.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Constant_optimization"/>
		<link rel="alternate" type="text/html" href="http://wcipeg.com/wiki/index.php?title=Constant_optimization&amp;action=history"/>
		<updated>2026-05-04T21:35:42Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.2</generator>

	<entry>
		<id>http://wcipeg.com/wiki/index.php?title=Constant_optimization&amp;diff=1544&amp;oldid=prev</id>
		<title>Brian: Created page with &quot;'''Constant optimization''' refers to optimizing a program in order to improve its performance by at most a constant factor, that is, decreasing the [[invisible ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wcipeg.com/wiki/index.php?title=Constant_optimization&amp;diff=1544&amp;oldid=prev"/>
				<updated>2011-12-25T07:22:39Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Constant optimization&amp;#039;&amp;#039;&amp;#039; refers to &lt;a href=&quot;/wiki/Optimization&quot; title=&quot;Optimization&quot;&gt;optimizing&lt;/a&gt; a program in order to improve its performance by at most a constant factor, that is, decreasing the [[invisible ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Constant optimization''' refers to [[optimization|optimizing]] a program in order to improve its performance by at most a constant factor, that is, decreasing the [[invisible constant factor]] on the program's running time, memory usage, and so on. It usually involves changing details of the implementation rather than the underlying [[algorithm]]. One example of constant optimization is ''loop unrolling'', which refers to replacing the body of a for loop with two or more iterations of itself so that the loop will only run half as many times, or fewer; this does not change the amount of work done ''inside'' the loop, but it means the termination condition will be checked less often, thus reducing the total number of instructions the CPU has to execute; this will decrease the running time by at most a constant factor.&lt;br /&gt;
&lt;br /&gt;
Constant optimization is sometimes required in order to score full points on a contest problem with a &amp;quot;tight&amp;quot; time limit. If there are up to 100000 lines of input and you write a program whose algorithm is &amp;lt;math&amp;gt;O(N \log N)&amp;lt;/math&amp;gt;, your program might be too slow; on the other hand, if your algorithm is &amp;lt;math&amp;gt;O(N^2)&amp;lt;/math&amp;gt;, then it is almost certainly too slow, and trying to optimize it to &amp;lt;math&amp;gt;O(N \log N)&amp;lt;/math&amp;gt; should be undertaken before optimizing the constant factor.&lt;br /&gt;
&lt;br /&gt;
[[Category:Stubs]]&lt;/div&gt;</summary>
		<author><name>Brian</name></author>	</entry>

	</feed>