{"id":1179,"date":"2009-03-03T02:15:17","date_gmt":"2009-03-03T10:15:17","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=1179"},"modified":"2010-01-22T14:42:45","modified_gmt":"2010-01-22T22:42:45","slug":"intel-beats-up-gcc","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/","title":{"rendered":"Intel Beats Up GCC"},"content":{"rendered":"<p><strong>Executive Summary:<\/strong> Showcased by FFmpeg, Intel&#8217;s C Compiler beats gcc&#8217;s C compiler. Handily. Decisively. I stop just short of brutal dismemberment metaphors because that just seems so tasteless, and because I know there must be options to explore in order to improve gcc&#8217;s numbers.<\/p>\n<p>Pursuant to <a href=\"http:\/\/multimedia.cx\/eggs\/compiler-performance-profiling-with-ffmpeg\/\">my last post where I found results all over the map<\/a> when comparing <a href=\"http:\/\/ffmpeg.org\/\">FFmpeg<\/a>&#8216;s performance when built with different compilers, with Intel&#8217;s C compiler (icc) barely edging out gcc 4.1.2, <a href=\"http:\/\/multimedia.cx\/eggs\/compiler-performance-profiling-with-ffmpeg\/#comment-142370\">David Conrad recommended<\/a> that I try building FFmpeg with all ASM and manual SIMD optimizations disabled. In doing so, the compilers would have a chance to really shine in optimizing plain C code for a computationally intensive &#8212; not to mention commonplace &#8212; task. And so I repeated the same test, only I configured the builds with these options:<\/p>\n<pre>\r\n.\/configure --disable-yasm --disable-mmx \\ \r\n--disable-mmx2 --disable-sse --disable-ssse3\r\n<\/pre>\n<p>I also built static binaries with no swscale, if that makes any difference. After each build, I manually audited the resulting binary using the command:<\/p>\n<p>objdump -d ffmpeg_g | grep movq<\/p>\n<p>This method is predicated on the observation that x86 SIMD code blocks nearly always involve at least a movq (move quadword) instruction.<\/p>\n<p>Then I did 2 runs back to back with each build. The results are thus:<\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/03\/icc-beats-gcc.png\" alt=\"icc savagely destroys gcc\" title=\"icc savagely destroys gcc\" width=\"478\" height=\"252\" class=\"aligncenter size-full wp-image-1182\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/03\/icc-beats-gcc.png 478w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/03\/icc-beats-gcc-300x158.png 300w\" sizes=\"auto, (max-width: 478px) 100vw, 478px\" \/><br \/>\n<\/center><\/p>\n<p>It&#8217;s interesting to note that icc&#8217;s build tested positive for movq instructions&#8211; they appear to be generated by the compiler, not present due to FFmpeg code. If the compiler was smart enough to build a binary that uses SIMD where appropriate, I count that as fair game for this exercise. Note that I didn&#8217;t specify any specific CPU type to icc. Meanwhile, the optimization level for the gcc builds is cranked up to -O3 (same with icc).<\/p>\n<p>I&#8217;m eager to hear how gcc&#8217;s numbers might be improved in this case (especially for the latest gcc versions). For reference, every one of these gcc compiler versions was built from source by me. Did I neglect to configure with some &#8211;turbo option? Also, fairness dictates that I field suggestions about how to coax icc into building an FFmpeg binary that further embarrasses gcc &#8212; and, by extension, free software &#8212; in this matter.<\/p>\n<p>Hey, wanna hear something really creepy? <em>Just<\/em> as I was finishing this post, an <em>apparently<\/em> automated email arrived from Intel, asking for my feedback on icc.<\/p>\n<p><strong>See Also:<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/multimedia.cx\/eggs\/icc-vs-gcc-smackdown-round-3\/\">Next smackdown in the series<\/a><\/li>\n<li><a href=\"http:\/\/multimedia.cx\/eggs\/compiler-performance-profiling-with-ffmpeg\/\">Previous smackdown in the series<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>On the suggestion of a commenter, I repeated my icc vs. gcc experiment and found that icc soundly thrashes gcc<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-1179","post","type-post","status-publish","format-standard","hentry","category-programming"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"On the suggestion of a commenter, I repeated my icc vs. gcc experiment and found that icc soundly thrashes gcc\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Multimedia Mike\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Intel&#039;s C Compiler Beats GCC In Controlled Tests | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta property=\"og:description\" content=\"On the suggestion of a commenter, I repeated my icc vs. gcc experiment and found that icc soundly thrashes gcc\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2009-03-03T10:15:17+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2010-01-22T22:42:45+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Intel&#039;s C Compiler Beats GCC In Controlled Tests | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta name=\"twitter:description\" content=\"On the suggestion of a commenter, I repeated my icc vs. gcc experiment and found that icc soundly thrashes gcc\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/intel-beats-up-gcc\\\/#article\",\"name\":\"Intel's C Compiler Beats GCC In Controlled Tests | Breaking Eggs And Making Omelettes\",\"headline\":\"Intel Beats Up GCC\",\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/wp-content\\\/uploads\\\/2009\\\/03\\\/icc-beats-gcc.png\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/intel-beats-up-gcc\\\/#articleImage\",\"width\":478,\"height\":252},\"datePublished\":\"2009-03-03T02:15:17-08:00\",\"dateModified\":\"2010-01-22T14:42:45-08:00\",\"inLanguage\":\"en-US\",\"commentCount\":15,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/intel-beats-up-gcc\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/intel-beats-up-gcc\\\/#webpage\"},\"articleSection\":\"Programming\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/intel-beats-up-gcc\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/programming\\\/#listItem\",\"position\":2,\"name\":\"Programming\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/programming\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/intel-beats-up-gcc\\\/#listItem\",\"name\":\"Intel Beats Up GCC\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/intel-beats-up-gcc\\\/#listItem\",\"position\":3,\"name\":\"Intel Beats Up GCC\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/\",\"name\":\"Multimedia Mike\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/intel-beats-up-gcc\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Multimedia Mike\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/intel-beats-up-gcc\\\/#webpage\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/intel-beats-up-gcc\\\/\",\"name\":\"Intel's C Compiler Beats GCC In Controlled Tests | Breaking Eggs And Making Omelettes\",\"description\":\"On the suggestion of a commenter, I repeated my icc vs. gcc experiment and found that icc soundly thrashes gcc\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/intel-beats-up-gcc\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"datePublished\":\"2009-03-03T02:15:17-08:00\",\"dateModified\":\"2010-01-22T14:42:45-08:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Intel's C Compiler Beats GCC In Controlled Tests | Breaking Eggs And Making Omelettes","description":"On the suggestion of a commenter, I repeated my icc vs. gcc experiment and found that icc soundly thrashes gcc","canonical_url":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/#article","name":"Intel's C Compiler Beats GCC In Controlled Tests | Breaking Eggs And Making Omelettes","headline":"Intel Beats Up GCC","author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/03\/icc-beats-gcc.png","@id":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/#articleImage","width":478,"height":252},"datePublished":"2009-03-03T02:15:17-08:00","dateModified":"2010-01-22T14:42:45-08:00","inLanguage":"en-US","commentCount":15,"mainEntityOfPage":{"@id":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/#webpage"},"isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/#webpage"},"articleSection":"Programming"},{"@type":"BreadcrumbList","@id":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","position":1,"name":"Home","item":"https:\/\/multimedia.cx\/eggs","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/programming\/#listItem","name":"Programming"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/programming\/#listItem","position":2,"name":"Programming","item":"https:\/\/multimedia.cx\/eggs\/category\/programming\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/#listItem","name":"Intel Beats Up GCC"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/#listItem","position":3,"name":"Intel Beats Up GCC","previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/programming\/#listItem","name":"Programming"}}]},{"@type":"Organization","@id":"https:\/\/multimedia.cx\/eggs\/#organization","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","url":"https:\/\/multimedia.cx\/eggs\/"},{"@type":"Person","@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author","url":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/","name":"Multimedia Mike","image":{"@type":"ImageObject","@id":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Multimedia Mike"}},{"@type":"WebPage","@id":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/#webpage","url":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/","name":"Intel's C Compiler Beats GCC In Controlled Tests | Breaking Eggs And Making Omelettes","description":"On the suggestion of a commenter, I repeated my icc vs. gcc experiment and found that icc soundly thrashes gcc","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/#website"},"breadcrumb":{"@id":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/#breadcrumblist"},"author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"creator":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"datePublished":"2009-03-03T02:15:17-08:00","dateModified":"2010-01-22T14:42:45-08:00"},{"@type":"WebSite","@id":"https:\/\/multimedia.cx\/eggs\/#website","url":"https:\/\/multimedia.cx\/eggs\/","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","inLanguage":"en-US","publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"}}]},"og:locale":"en_US","og:site_name":"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering","og:type":"article","og:title":"Intel's C Compiler Beats GCC In Controlled Tests | Breaking Eggs And Making Omelettes","og:description":"On the suggestion of a commenter, I repeated my icc vs. gcc experiment and found that icc soundly thrashes gcc","og:url":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/","article:published_time":"2009-03-03T10:15:17+00:00","article:modified_time":"2010-01-22T22:42:45+00:00","twitter:card":"summary","twitter:title":"Intel's C Compiler Beats GCC In Controlled Tests | Breaking Eggs And Making Omelettes","twitter:description":"On the suggestion of a commenter, I repeated my icc vs. gcc experiment and found that icc soundly thrashes gcc"},"aioseo_meta_data":{"post_id":"1179","title":"Intel's C Compiler Beats GCC In Controlled Tests | #site_title","description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-31 22:02:34","updated":"2025-12-31 19:08:18","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\/category\/programming\/\" title=\"Programming\">Programming<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tIntel Beats Up GCC\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/multimedia.cx\/eggs"},{"label":"Programming","link":"https:\/\/multimedia.cx\/eggs\/category\/programming\/"},{"label":"Intel Beats Up GCC","link":"https:\/\/multimedia.cx\/eggs\/intel-beats-up-gcc\/"}],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=1179"}],"version-history":[{"count":9,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1179\/revisions"}],"predecessor-version":[{"id":2105,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1179\/revisions\/2105"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=1179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=1179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=1179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}