Search code examples
.netmulticorejit

Why is Multicore JIT not "on by default" in .net 4.5?


In .net 4.5 there is a new feature called Multicore JIT

http://blogs.msdn.com/b/dotnet/archive/2012/10/18/an-easy-solution-for-improving-app-launch-performance.aspx

It allows for performance improvements to app startup times.

However you need to enable it in code.

So why is it not on by default?


Solution

  • I wrote the blog post you linked to and Vance addresses your question in the embedded video around 30:15.

    Multicore JIT is on by default for Silverlight 5 and ASP.NET applications, but not for desktop applications. The main reason for this is that the CLR needs a place to save and load the files containing the JIT profile information.

    Silverlight 5 and ASP.NET applications are hosted applications and the host provides a good place to store the profile information. We also know that all of these applications have a similar startup path and will be able to take advantage of MCJ. For desktop applications we don't have a good location to put the profile, and not all applications will benefit from MCJ on process startup. For desktop applications, we chose to provide a set of APIs that can be used to "opt-in" if it will benefit your application.

    Thanks for reading the post, and if you have seen any results from using the feature I'd love to hear about it!