{"id":1499,"date":"2016-08-10T09:32:29","date_gmt":"2016-08-10T13:32:29","guid":{"rendered":"http:\/\/codinggorilla.domemtech.com\/?p=1499"},"modified":"2016-08-10T13:30:28","modified_gmt":"2016-08-10T17:30:28","slug":"runtime-performance-of-net-core-vs-net-framework-vs-mono","status":"publish","type":"post","link":"http:\/\/165.227.223.229\/index.php\/2016\/08\/10\/runtime-performance-of-net-core-vs-net-framework-vs-mono\/","title":{"rendered":"Runtime Performance of NET Core vs. NET Framework vs. Mono"},"content":{"rendered":"<p>With the\u00c2\u00a0<a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2016\/06\/27\/announcing-net-core-1-0\/\" target=\"_blank\">release<\/a> of\u00c2\u00a0<a href=\"https:\/\/www.microsoft.com\/net\/core\" target=\"_blank\">NET Core<\/a>, the <a href=\"http:\/\/www.biztechmagazine.com\/article\/2016\/03\/microsoft-will-use-xamarin-deal-expand-cross-platform-app-vision\" target=\"_blank\">acquisition\u00c2\u00a0of Xamarin<\/a> and Mono, and the 15 or so years of development of the <a href=\"https:\/\/en.wikipedia.org\/wiki\/.NET_Framework\" target=\"_blank\">NET Framework<\/a>, we now have three platforms to choose from for C#. Why are there three platforms? What are the differences between each? And, what is the performance of the three to each other?\u00c2\u00a0From the <a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2016\/07\/15\/net-core-roadmap\/\" target=\"_blank\">NET Core Roadmap<\/a>, it&#8217;s clear that Microsoft is trying to focus on OS-agnostic implementations of NET.<\/p>\n<p>NET Framework is for Windows desktop and mobile applications. The NET Framework is specific for Windows because it has Windows UI functionality. If you want an application that works across different OSes, then this won&#8217;t be your choice.<\/p>\n<p>NET Core is for console and server applications that need to work on any OS. Also, a focus of the NET Core framework is small size\/efficient applications. The first release was only a month ago, and there are many things missing. If you need UI beyond System.Console, look to one of the other two platforms.<\/p>\n<p>Finally, Mono\/Xamarin is for mobile applications. Mono can also run NET Framework console applications on most OSes without changes. On Android, C# and Java can call each other. If you have a large Java code base, this is a good choice. Xamarin Forms is an OS-independent UI for mobile devices.<\/p>\n<p>What are the\u00c2\u00a0differences in performance between NET Framework, NET Core, and Mono? The following test computes the performance of a recursive implementation of Ackermann&#8217;s function and a looping implementation of a Fibonacci function. If you are looking for performance of in a console application, NET Core is your choice.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1504\" src=\"http:\/\/codinggorilla.domemtech.com\/wordpress\/wp-content\/uploads\/2016\/08\/NetPerf1.png\" alt=\"NetPerf1\" width=\"868\" height=\"775\" \/><\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1503\" src=\"http:\/\/codinggorilla.domemtech.com\/wordpress\/wp-content\/uploads\/2016\/08\/NetPerf2.png\" alt=\"NetPerf2\" width=\"869\" height=\"775\" \/><\/p>\n<p>Runtimes based on sample size of 10, .NET Core 1.0.1, .NET Framework 4.5, Mono JIT compiler version 4.2.2 (Visual Studio built mono), Windows 10 Anniversary Update, Intel(R) Core(TM) i5-3570K CPU @ 3.40GH,\u00c2\u00a0Northbridge Intel Ivy Bridge rev. 09,\u00c2\u00a0Southbridge Intel Z77 rev. 04,\u00c2\u00a0Graphic Interface PCI-Express,\u00c2\u00a0PCI-E Link Width x16,\u00c2\u00a0PCI-E Max Link Width x16,\u00c2\u00a0Memory Type DDR3,\u00c2\u00a0Memory Size 16 GBytes,\u00c2\u00a0Channels Dual,\u00c2\u00a0Memory Frequency 800.7 MHz (1:6),\u00c2\u00a0CAS# latency (CL) 11.0,\u00c2\u00a0RAS# to CAS# delay (tRCD) 11,\u00c2\u00a0RAS#, Precharge (tRP) 11,\u00c2\u00a0Cycle Time (tRAS) 28,\u00c2\u00a0Command Rate (CR) 2T,\u00c2\u00a0Host Bridge 0x0150.<\/p>\n<p>On Ubuntu, there is a similar speedup for Ackermann&#8217;s function with NET Core. But for the Fibonacci function,\u00c2\u00a0surprisingly slightly slower with NET Core compared to the Mono implementation.<\/p>\n<h3>\u00c2\u00a0<img loading=\"lazy\" class=\"aligncenter size-full wp-image-1505\" src=\"http:\/\/codinggorilla.domemtech.com\/wordpress\/wp-content\/uploads\/2016\/08\/PerfAckUb.png\" alt=\"PerfAckUb\" width=\"863\" height=\"775\" \/><\/h3>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1506\" src=\"http:\/\/codinggorilla.domemtech.com\/wordpress\/wp-content\/uploads\/2016\/08\/PerfFibUb.png\" alt=\"PerfFibUb\" width=\"866\" height=\"744\" \/><\/p>\n<p>Runtimes based on sample size of 3, .NET Core 1.0.1, .NET Framework 4.5, Mono JIT compiler version 4.4.2 (Stable 4.4.2.11\/f72fe45 Fri Jul 29 09:58:49 UTC 2016);\u00c2\u00a0Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz; 512 MB Memory \/ 20 GB Disk \/ SFO2 <span class=\"image-name\">&#8211; Ubuntu 16.04.1 x64.<\/span><\/p>\n<h3>Benchmark Code:<\/h3>\n<p><a href=\"https:\/\/1drv.ms\/u\/s!Atb3HX_AxX9Zp0BSIwGjjQZH5PM1\" target=\"_blank\">perf.tar.gz<\/a><\/p>\n<p><a href=\"https:\/\/1drv.ms\/x\/s!Atb3HX_AxX9Zpz1p5zdowYkRRPKf\" target=\"_blank\">Data analysis in XLSX<\/a><\/p>\n<h3>Further Information:<\/h3>\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/cesardelatorre\/2016\/06\/27\/net-core-1-0-net-framework-xamarin-the-whatand-when-to-use-it\/\" target=\"_blank\">.NET Core 1.0, .NET Framework, Xamarin \u00e2\u20ac\u201c The \u00e2\u20ac\u009cWHAT and WHEN to use it\u00e2\u20ac\u009d<\/a>.\u00c2\u00a0 Accessed August 10, 2016.<\/p>\n<p><a href=\"http:\/\/www.infoworld.com\/article\/3098327\/application-development\/microsoft-reveals-big-plans-for-net-core.html\" target=\"_blank\">Microsoft reveals big plans for .Net Core<\/a>. Accessed August 10, 2016.<\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/articles\/core\/index\" target=\"_blank\">.NET Core<\/a>.\u00c2\u00a0Accessed August 10, 2016.<\/p>\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2016\/07\/15\/net-core-roadmap\/\" target=\"_blank\">.NET Core Roadmap<\/a>.\u00c2\u00a0Accessed August 10, 2016.<\/p>\n<p><a href=\"http:\/\/www.i-programmer.info\/news\/89-net\/9866-net-core-version-1-released-so-what.html\" target=\"_blank\">.NET Core Version 1 Released &#8211; So What?<\/a> Accessed August 10, 2016.<\/p>\n<p><a href=\"http:\/\/www.infoworld.com\/article\/3101949\/application-development\/getting-started-with-aspnet-core.html\" target=\"_blank\">Getting Started with ASP.Net Core<\/a> Accessed August 10, 2016.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the\u00c2\u00a0release of\u00c2\u00a0NET Core, the acquisition\u00c2\u00a0of Xamarin and Mono, and the 15 or so years of development of the NET Framework, we now have three platforms to choose from for C#. Why are there three platforms? What are the differences between each? And, what is the performance of the three to each other?\u00c2\u00a0From the NET &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/165.227.223.229\/index.php\/2016\/08\/10\/runtime-performance-of-net-core-vs-net-framework-vs-mono\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Runtime Performance of NET Core vs. NET Framework vs. Mono&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts\/1499"}],"collection":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/comments?post=1499"}],"version-history":[{"count":0,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts\/1499\/revisions"}],"wp:attachment":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/media?parent=1499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/categories?post=1499"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/tags?post=1499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}