<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 4, 2015 at 1:22 PM, Filip Pizlo <span dir="ltr">&lt;<a href="mailto:fpizlo@apple.com" target="_blank">fpizlo@apple.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Nov 4, 2015, at 10:03 AM, Alfonso Guerra &lt;<a href="mailto:huperniketes@gmail.com" target="_blank">huperniketes@gmail.com</a>&gt; wrote:</div><div><div dir="ltr"><div><br></div><div>was ~20% faster on my machine.</div></div></div></blockquote><div><br></div></span><div>It’s very surprising that this made any difference.  Compilers are ordinarily smart enough to understand the equivalence of ++x and x++ if the result is unused.  Are you sure you compiled with optimizations enabled?</div></div></div></blockquote><div><br></div><div>I hadn&#39;t. With full optimizations and tweaking of the driver to prevent the compiler from optimizing away invocation of the functions entirely, the difference is only ~1.3-3.3%.</div><div><br></div><div>No longer as substantial. It beats Lightspeed C, but it&#39;s best not to depend on optimization for code which is modeled on an obsolete processor architecture, and is so easy to write. Doubly so when using non-optimized builds for development.</div><div><br></div><div><br></div><div>Alfonso</div><div><br></div><div><br></div></div></div></div>