{"id":134,"date":"2008-10-22T19:18:25","date_gmt":"2008-10-22T23:18:25","guid":{"rendered":"http:\/\/www.timelordz.com\/blog\/?p=134"},"modified":"2008-10-28T14:45:14","modified_gmt":"2008-10-28T18:45:14","slug":"intel-c-compiler-for-linux","status":"publish","type":"post","link":"https:\/\/www.timelordz.com\/blog\/2008\/10\/intel-c-compiler-for-linux\/","title":{"rendered":"Intel C Compiler for Linux"},"content":{"rendered":"<div id=\"attachment_141\" style=\"width: 60px\" class=\"wp-caption alignright\"><a href=\"http:\/\/www.timelordz.com\/blog\/.\/wp-content\/uploads\/2008\/10\/linux-logo.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-141\" class=\"size-full wp-image-141\" title=\"linux-logo\" src=\"http:\/\/www.timelordz.com\/blog\/.\/wp-content\/uploads\/2008\/10\/linux-logo.png\" alt=\"Tux Rocks\" width=\"50\" height=\"50\" \/><\/a><p id=\"caption-attachment-141\" class=\"wp-caption-text\">Tux Rocks<\/p><\/div>\n<div id=\"attachment_140\" style=\"width: 70px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.timelordz.com\/blog\/.\/wp-content\/uploads\/2008\/10\/intel-logo.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-140\" class=\"size-full wp-image-140\" title=\"intel-logo\" src=\"http:\/\/www.timelordz.com\/blog\/.\/wp-content\/uploads\/2008\/10\/intel-logo.png\" alt=\"Atom Inside\" width=\"60\" height=\"40\" \/><\/a><p id=\"caption-attachment-140\" class=\"wp-caption-text\">Atom Inside<\/p><\/div>\n<p>Recently I learned that Intel makes its professional C compiler for Linux available for free. I discovered this  fact at this <a href=\"http:\/\/macles.blogspot.com\/2008\/09\/intel-cc-compiler-gcc-and-intel-atom.html\" target=\"_blank\">blog<\/a>, the writer of which extolled the virtues of the Intel C Compiler (<a href=\"http:\/\/www.intel.com\/cd\/software\/products\/asmo-na\/eng\/277618.htm\" target=\"_blank\">ICC<\/a>) and how the binaries it creates can run faster than those compiled with the GNU C compiler (GCC) &#8211; up to 35% faster. The author gave some test results of benchmarks created using Crafty, a chess engine.<\/p>\n<p>Well &#8211; 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.<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>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:<\/p>\n<div id=\"attachment_136\" style=\"width: 302px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.timelordz.com\/blog\/.\/wp-content\/uploads\/2008\/10\/gccvsicc.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-136\" class=\"size-medium wp-image-136\" title=\"gccvsicc\" src=\"http:\/\/www.timelordz.com\/blog\/.\/wp-content\/uploads\/2008\/10\/gccvsicc.jpg\" alt=\"Compiler Comparison\" width=\"292\" height=\"260\" \/><\/a><p id=\"caption-attachment-136\" class=\"wp-caption-text\">Compiler Comparison<\/p><\/div>\n<p>The substantial improvements available through compiling using the Intel C compiler clearly show it should be used when possible, particularly on computationally intensive applications.<\/p>\n<p>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.<\/p>\n<p>The specific Makefile options I used to compile each of the above three versions can be found on this <a title=\"Crafty Wiki Article\" href=\"http:\/\/www.timelordz.com\/wiki\/index.php\/Crafty_Chess_Compiler_Benchmarks\" target=\"_blank\">Wiki<\/a><a title=\"Crafty Article\" href=\"http:\/\/www.timelordz.com\/wiki\/index.php\/Crafty_Chess_Compiler_Benchmarks\" target=\"_blank\"> <\/a>article I wrote on Crafty &#8211; I did have to experiment with these a bit to get the ICC version to compile correctly. I also have a <a href=\"http:\/\/www.timelordz.com\/wiki\/index.php\/Intel_C_Compiler_for_Linux\" target=\"_blank\">page<\/a> on the Intel Compiler specifically here.<\/p>\n<p>Have fun test driving this for yourself and please comment your tests and findings, I would love to hear about them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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) &#8211; up [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,6,7],"tags":[],"class_list":["post-134","post","type-post","status-publish","format-standard","hentry","category-it-adventures","category-linux","category-sagolabs"],"_links":{"self":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts\/134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/comments?post=134"}],"version-history":[{"count":5,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts\/134\/revisions"}],"predecessor-version":[{"id":138,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts\/134\/revisions\/138"}],"wp:attachment":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/media?parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/categories?post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/tags?post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}