

Willus.com's 2011 Win32/64 C Compiler Benchmarks:

I. BACKGROUND

1. Overview

First published December 29, 2011, last updated April 8, 2012 Update Apr 8, 2012: Added comments on Open Watcom to the Compilers page. Update Apr 2, 2012: Corrected Digital Mars version. There is now a reddit discussion of these benchmarks. Update Feb 29, 2012: Corrected mistake in intro paragraph and commented on verification of benchmark results. Update Jan 21, 2012: Modified MS VC compile flags, added 64-bit MS VC 2010 results, and updated comments on MS VC. Update Jan 19, 2012: See update pointing to mailing list thread in Summary Section (under Intel's Transcendent Transcendental Performance). Update Jan 4, 2012: Added Crafty Chess engine benchmark. Update Jan 3, 2012: Added x264 benchmark. I published my first compiler performance comparison benchmark nearly a decade ago at the beginning of 2002. Since then, a lot has happened. Intel has come out with their Core-2 and subsequent CPUs, which now dominate the high-performance computing world. The GNU folks have been releasing regular, high-quality updates to gcc, and gcc 4.x, first released in April of 2005, is now fully mainstreamed. Intel and Microsoft, of course, have continued to evolve their compilers as well, and there are some interesting newcomers available for testing such as Fabrice Bellard's Tiny CC. With all of this progress, I finally started getting the itch to do a thorough compiler comparison again. Of course, now that I'm most of the way done, I am reminded why it took me nine years to get motivated for this. It's a lot of work to get six different compilers to compile over one million lines of C code, two-thirds of which I did not write myself! Disclaimer

As with my last benchmark, remember that these are only benchmarks, and as such may not represent the results you will actually get if you compare these compilers yourself. Plus I am not an expert on these compilers and had a very finite amount of time to do this, so I may not have picked the most representative set of test codes for your typical use and I may not have used the very best compiler options in every case. But I did use actual applications and simulation codes that I regularly use at work and home. Also, I'm a reasonable programmer (I know what it means to "vectorize" C programs for a Cray), but I don't pretend to be an expert on writing super-fast, super-efficient code. Mostly I try to write code as elegantly as possible without doing anything that will result in an obvious performance penalty. Also, a large fraction (approximately 2/3) of the code is from open-source libraries or applications.



As in 2002, I received no compensation of any kind for this review, and I have no advertising or sponsoring on my site. Opinions expressed here are purely my own.

