Friday, May 26, 2017

Using RyuJIT, the next generation JIT compiler for .NET

RyuJIT is the next generation Just-In-Time (JIT) compiler for .NET. It uses a high-performance JIT architecture, focused on high throughput JIT compilation. It is much faster than the existing JIT64 64-bit JIT that has been used for the last 10 years.  Before  the 32-bit JIT compiler was a lot faster than the 64-bit version making it sometimes better to compile and run your .NET application in 32-bit.

With the introduction of RyuJIT this gap is finally closed, making it easier to exclusively target 64-bit architectures or migrate workloads from 32- to 64-bit.

What should I do to enable RyuJIT?

The answer is simple; nothing Smile! If you have .NET Framework 4.6 installed, RyuJIT will be enabled for all 64-bit processes running on top of it. Your app will run in a 64-bit process if it is compiled as 64-bit or AnyCPU (although not as Prefer 32-bit), and run on a 64-bit operating system. RyuJIT is similarly integrated into .NET Core, as the 64-bit JIT.

If your servers are 64-bit(they probably are), and your applications are still using 32-bit, it’s time to do some benchmarking and maybe make the switch to 64-bit all the way!

Here is a link to the first time RuyJIT was announced almost 4 years ago: https://blogs.msdn.microsoft.com/dotnet/2013/09/30/ryujit-the-next-generation-jit-compiler-for-net/

No comments: