<div dir="ltr">Hi,<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 17, 2015 at 2:00 PM, vishal sarda <span dir="ltr"><<a href="mailto:vishalksarda@gmail.com" target="_blank">vishalksarda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
        
        
        


<p style="margin-bottom:0.35cm;line-height:115%">[snip]</p>
<p style="margin-bottom:0.35cm;line-height:115%">Loop counting up 
           0.15 ms</p>
<p style="margin-bottom:0.35cm;line-height:115%">Loop counting
down       0.08 ms</p></div></blockquote><div>I'm no llvm expert, but as an interest bystander: I suspect you compiled the source without any optimizations applied - I tried to replicate this behaviour and found the optimzer happily replaces both the inner loops you had with a constant, and thus I got the same time on both loops. (e.g. see <a href="http://goo.gl/aXFkVb">http://goo.gl/aXFkVb</a> ) </div><div><br></div><div>Benchmarks of this nature where the run time is so small are notoriously prone to measurement errors, so I'd be a little careful drawing conclusions from the sample you listed. Also; what architecture did you measure on, and what spec machine?</div><div><br></div><div>Not at all to dissuade you from investigating this optimization! I'm just a little sceptical of the benchmark you posted!</div><div><br></div><div>Best regards, </div><div><br></div><div>Matt</div><div><br></div></div>
</div></div>