<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Software is Crap]]></provider_name><provider_url><![CDATA[https://davmac.wordpress.com]]></provider_url><author_name><![CDATA[davmac]]></author_name><author_url><![CDATA[https://davmac.wordpress.com/author/davmac/]]></author_url><title><![CDATA[Updated C compiler benchmarks, Feb&nbsp;2012]]></title><type><![CDATA[link]]></type><html><![CDATA[<p>With several new compiler releases it&#8217;s time to update my compiler benchmark results (last round of results <a href="https://davmac.wordpress.com/2010/07/11/updated-c-compiler-benchmarks-llvm-2-7-libfirm-1-18-1/">here</a>, description of the benchmark programs <a href="https://davmac.wordpress.com/2009/04/28/c-compiler-benchmarks/">here</a>). Note that the tests were on a different machine this time and the number of iterations was tweaked so numerical results aren&#8217;t comparable.</p>
<p>Without further ado:</p>
<p><a href="https://davmac.files.wordpress.com/2012/02/c-compiler-benchmark3.png"><img data-attachment-id="240" data-permalink="https://davmac.wordpress.com/2012/02/27/updated-c-compiler-benchmarks-feb-2012/c-compiler-benchmark3/" data-orig-file="https://davmac.files.wordpress.com/2012/02/c-compiler-benchmark3.png?w=450&#038;h=555" data-orig-size="600,741" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="c-compiler-benchmark3" data-image-description="" data-medium-file="https://davmac.files.wordpress.com/2012/02/c-compiler-benchmark3.png?w=450&#038;h=555?w=243" data-large-file="https://davmac.files.wordpress.com/2012/02/c-compiler-benchmark3.png?w=450&#038;h=555?w=600" class="alignnone size-full wp-image-240" title="c-compiler-benchmark3" src="https://davmac.files.wordpress.com/2012/02/c-compiler-benchmark3.png?w=450&#038;h=555" alt="" width="450" height="555" srcset="https://davmac.files.wordpress.com/2012/02/c-compiler-benchmark3.png?w=450&amp;h=555 450w, https://davmac.files.wordpress.com/2012/02/c-compiler-benchmark3.png?w=121&amp;h=150 121w, https://davmac.files.wordpress.com/2012/02/c-compiler-benchmark3.png?w=243&amp;h=300 243w, https://davmac.files.wordpress.com/2012/02/c-compiler-benchmark3.png 600w" sizes="(max-width: 450px) 100vw, 450px" /></a></p>
<p>So, what&#8217;s interesting in this set of results? Generally, note that LLVM and GCC now substantially compete for dominance. Notably, GCC canes LLVM in bm4, where it appears that GCC generates very good &#8220;memmove&#8221; code, whereas LLVM generates much more concise but apparently also much slower code; also in bm8 (trivial loop removal &#8211; though neither compiler actually performs this optimization, GCC apparently generates faster code). On the other hand LLVM beats GCC quite handily in bm6 (a common subexpression elimination problem).</p>
<p>GCC 4.6.2 improves quite a bit over 4.5.2 in bm5 (essentially a common subexpression refactoring test). However, it&#8217;s slightly worse in bm3 and for some reason there is a huge drop in performance for the bm7 test (stack placement of returned structure).</p>
<p>The Firm suite, surprisingly, mostly loses ground with 1.20.0 and remains uncompetitive.</p>
<p><strong>Edit 25/03/12</strong>: I&#8217;ve noticed a flaw in bm6, which when corrected causes GCC to perform much worse &#8211; about 0.5 seconds rather than the 0.288 reported above.</p>
]]></html><thumbnail_url><![CDATA[https://davmac.files.wordpress.com/2012/02/c-compiler-benchmark3.png?fit=440%2C330]]></thumbnail_url><thumbnail_width><![CDATA[267]]></thumbnail_width><thumbnail_height><![CDATA[330]]></thumbnail_height></oembed>