{"id":55951,"date":"2010-01-05T12:51:00","date_gmt":"2010-01-05T12:51:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/pfxteam\/2010\/01\/05\/faq-why-is-the-speedup-not-x-on-my-x-way-machine\/"},"modified":"2010-01-05T12:51:00","modified_gmt":"2010-01-05T12:51:00","slug":"faq-why-is-the-speedup-not-x-on-my-x-way-machine","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/faq-why-is-the-speedup-not-x-on-my-x-way-machine\/","title":{"rendered":"FAQ :: Why is the speedup not X on my X-way machine?"},"content":{"rendered":"<p><P class=\"MsoNormal\"><A title=\"_Toc247434916\" name=\"_Toc247434916\"><\/A><FONT face=\"Calibri\"><FONT size=\"3\">We\u2019ll be regularly posting answers to frequently asked questions that we\u2019ve gotten on the forum, internal email lists, etc.<SPAN>&nbsp; <\/SPAN>Here\u2019s the first \u2013 enjoy!<\/FONT><\/FONT><\/P>\n<P class=\"MsoNormal\"><FONT size=\"3\"><FONT face=\"Calibri\"><STRONG>Why is the speedup not X on my X-way machine?&nbsp; Or, why does my parallel code run slower?<\/STRONG>&nbsp;<\/FONT><\/FONT><\/P>\n<P class=\"MsoNormal\"><FONT size=\"3\"><FONT face=\"Calibri\">Less than ideal speedup can typically be attributed to two things:<\/FONT><\/FONT><\/P>\n<P class=\"MsoListParagraph\"><SPAN><SPAN><FONT size=\"3\" face=\"Calibri\">1.<\/FONT><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/SPAN><\/SPAN><\/SPAN><FONT size=\"3\"><FONT face=\"Calibri\"><U>Sequential costs<\/U>.<SPAN>&nbsp; <\/SPAN>It\u2019s often the case that parts of a particular algorithm must be executed sequentially.<SPAN>&nbsp; <\/SPAN>As the parallelizable parts get faster (with the addition of more cores), the sequential parts become more significant (<A title=\"Amdahl's Law Graph\" href=\"https:\/\/blogs.msdn.com\/pfxteam\/attachment\/9944172.ashx\" target=\"_blank\">Amdahl&#8217;s Law<\/A>).<\/FONT><\/FONT><\/P>\n<P class=\"MsoListParagraph\"><SPAN><SPAN><FONT size=\"3\" face=\"Calibri\">2.<\/FONT><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/SPAN><\/SPAN><\/SPAN><FONT size=\"3\"><FONT face=\"Calibri\"><U>General overheads<\/U>.<SPAN>&nbsp; <\/SPAN>For example, the costs associated with partitioning\/merging data, scheduling tasks to the runtime, synchronization to support additional features, or delegate invocations.<\/FONT><\/FONT><\/P>\n<P class=\"MsoNormal\"><FONT size=\"3\"><FONT face=\"Calibri\">The former can sometimes be addressed by choosing a different algorithm that requires less serial execution.<SPAN>&nbsp; <\/SPAN>The latter can often be addressed by reducing communication between tasks in a parallel operation, making fine-grained parallelism more coarse-grained, etc.<SPAN>&nbsp; <\/SPAN>Also, Microsoft is constantly working to reduce the impact of both points, where possible.<\/FONT><\/FONT><\/P><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/21\/2019\/02\/amdahls-law.png\">amdahls-law.png<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019ll be regularly posting answers to frequently asked questions that we\u2019ve gotten on the forum, internal email lists, etc.&nbsp; Here\u2019s the first \u2013 enjoy! Why is the speedup not X on my X-way machine?&nbsp; Or, why does my parallel code run slower?&nbsp; Less than ideal speedup can typically be attributed to two things: 1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sequential [&hellip;]<\/p>\n","protected":false},"author":485,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[7908],"tags":[7907,7923,7909,7910,7912],"class_list":["post-55951","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pfxteam","tag-net-4","tag-faq","tag-parallel-extensions","tag-plinq","tag-task-parallel-library"],"acf":[],"blog_post_summary":"<p>We\u2019ll be regularly posting answers to frequently asked questions that we\u2019ve gotten on the forum, internal email lists, etc.&nbsp; Here\u2019s the first \u2013 enjoy! Why is the speedup not X on my X-way machine?&nbsp; Or, why does my parallel code run slower?&nbsp; Less than ideal speedup can typically be attributed to two things: 1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sequential [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/55951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/485"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=55951"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/55951\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=55951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=55951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=55951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}