Intel C Compiler for Linux
by admin on Oct.22, 2008, under IT Adventures, Linux, Sago Labs
Recently I learned that Intel makes its professional C compiler for Linux available for free. I discovered this fact at this blog, the writer of which extolled the virtues of the Intel C Compiler (ICC) and how the binaries it creates can run faster than those compiled with the GNU C compiler (GCC) – up to 35% faster. The author gave some test results of benchmarks created using Crafty, a chess engine.
Well – all this seemed pretty interesting to me! Using Crafty seemed a great idea, chess engines being so computationally intensive. Crafty also has an apparently undocumented benchmark function, so this is perfect.
Of course I am familiar that different compilers, compiling options and optimizations can effect the performance of the resulting binary, but I have never personally compared these results. And the potential for such significant gains was too tempting to pass up. Plus I could experiment with the Atom specific optimization flag. A veritable candy store of geekness.
I decided to duplicate that authors test, using the Intel and GNU compilers to compile Crafty and generate some benchmarks. My results were quite comparable to his, in fact the ICCC benchmarks were a bit better.
Here you can see the comparison between the GCC and ICC versions, and well as a third option showing an ICC version compiled with the -xL optimization flag for the Intel Atom.
In Crafty there was a slight improvement compiling with the -xL flag specifically for the Atom architecture. However, there is a significant difference between the ICC and GCC versions as you can see:
The substantial improvements available through compiling using the Intel C compiler clearly show it should be used when possible, particularly on computationally intensive applications.
Installing ICC is quite straightforward. Ensure you have GCC and G++ (called GCC-C++ in some distro packages) as these are required. Then just run the install script.
The specific Makefile options I used to compile each of the above three versions can be found on this Wiki article I wrote on Crafty – I did have to experiment with these a bit to get the ICC version to compile correctly. I also have a page on the Intel Compiler specifically here.
Have fun test driving this for yourself and please comment your tests and findings, I would love to hear about them.
Leave a Reply
You must be logged in to post a comment.
November 17th, 2008 on 10:36 pm
Hey there Everyone,
I see quite a few hits on this post and the related Wiki articles. I would love to hear about any others out there who are compiling Crafty with ICC and the results you are getting. If you do, or get stuck with it post a comment here and I or someone else might be able to help!
Cheers,
Pete
August 11th, 2009 on 10:55 pm
[…] and the peformance of binaries it compiles against the Intel (icc) and GNU (gcc) compilers. I previously wrote on comparing Intel Linux C complier and gcc binaries using the Crafty chess engine and was quite […]