<br><br><div class="gmail_quote">On Tue, Apr 19, 2011 at 2:13 PM, Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
 <br>Hi guys. Unix and Windows confs have -O2. However, in Mac, the Carbon ones have -O3 y the cocoa ones -Os.<br>As far as I know -Os is for size, so we really don&#39;t care about that (unless we are in a mobile device). So, is there a reason why Unix and Windows use -O2 and Mac -O3 ?  should we chage this?  which should we use?<br clear="all">
</blockquote><div><br></div><div>Use what works based on testing and field experience.  I expect everything is there for a reason. IIABDFI (if it ain&#39;t broke don&#39;t fix it).  If you can produce a comprehensive stress test then you can experiment with different optimization levels.  If you can&#39;t you&#39;re on thin ice changing them.</div>
<div><br></div><div>Further, at least in Cog the speed of the VM (as opposed to plugins) is much less dependent on the level of compiler optimization used since that has no effect on the code the Cogit generates.  BTW, often -Os gets good speed since compact code can often be fast code, at least in systems without huge inner loops where there&#39;s little opportunity for loop-unrolling and inlining to make much difference.  Bloated code can have poor cache performance.  On current processors, hugely fast relative to memory speed, unless you&#39;re talking about media streaming algorithms inlining and loop unrolling is a dubious optimization to apply.  hence I would stick with -Os or -O2 for the core VM and choose more aggressive settings for selected plugins.</div>
<div><br></div><div>hope this makes sense</div><div>Eliot</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>Thanks in advance,<br><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>
<br></blockquote></div><br>