RyuJIT - The Next Gen JIT .NET Compiler
Written by Mike James   
Wednesday, 02 October 2013

There isn't much news about .NET proper these days, so let's celebrate that fact that there is a new JIT compiler to try out.

net2

 

The wider .NET world is under a bit of a cloud because of Microsoft's adoption of WinRT as its new poster child for apps. The C# and Visual Basic languages may be allowed to play with WinRT, but the core .NET system is doesn't have many plans to be going places. Silverlight is on its way out, of this we are sure, but the future of other .NET technologies is by no means secure. 

Not everyone shares this point of view, but it is clear that the rate of progress in the .NET world isn't what it was.

So news of RyuJIT is being greeted with a slightly over-enthusiastic reception. In past times, the news of an upgrade to a JIT might have gone unnoticed as the latest WPF tweak was given all the attention. 

RyuJIT, and it really is a great name isn't it, is a 64-bit JIT compiler for the CLR. Just in case you have forgotten, the usual method of running a .NET program is to compile it to MSIL - an intermediate machine independent code. The JIT then compiles this to machine code when the program is actually run. What this means is that the same JIT compiles MSIL code from C#, VB or any .NET language. 

It is generally believed that 64-bit programs always run faster than 32-bit programs, but this is only true if they make use of 64-bit data. Most programs suffer a performance hit on 64-bit, if only because their pointers are twice as long. To get something out of the 64-bit architecture the compiler has to make use of the increased number of registers and perform optimization.

The current 64-Bit JIT compiler in .NET produces good code, but it does the job slowly. The original idea was that the 32-Bit JIT should be fast rather that produce good code because this is what mattered on desktop machines, whereas the 64-bit JIT was mostly used on servers where code quality mattered but startup time didn't.

The new JIT compiler is claimed to be twice as fast as the old one. This means that 64-bit .NET apps start up about 30% faster - not all of the startup time is down to the JIT. This may not sound much, but there are extreme examples where the speed increase is much more. For example, one test case using regular expressions went from a 60-second compile to just 1.8 seconds. There are also gains in the working set size - the regular expression program went from 1.4GBytes peak working set to 199MBytes. So in some cases the improvement will be very noticeable. 

The .NET team says that the big internal advantage, and something that will payoff in the future, is that it is based on the same codebase as the x86 JIT and will be the foundation for all future JIT compilers. It may only be 64-bit at the moment, but the plan is to target 32-bit Intel and ARM architectures. 

Currently the JIT compiler runs only under Windows 8.1 or Server 2012R2, 64-bit of course, abut there are plans for it to work with other versions. 

 net2

More Information

RyuJIT: The next-generation JIT compiler for .NET

Related Articles

Visual Studio 2013 Release Candidate Available

Visual Studio 2012 Update 2

Microsoft Changes Mind - Devs Can Have 8.1 Early

Microsoft Team Explains Language Stagnation    

Visual Studio 2013 Preview       

Dumping .NET - Microsoft's Madness

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

Banner


Firefox 1.0 Released 20 Years Ago
10/11/2024

A news item with the headline "Firefox browser takes on Microsoft" from 20 years ago has attracted renewed attention. It was originally published on the BBC News website on November 9th, 2004 rec [ ... ]



GitHub Universe AI Announcements - Copilot And Spark
30/10/2024

GitHub has announced several improvements for developers at Universe, its annual conference. Developers will get multi-model Copilot and GitHub Spark, an AI-native tool for building applications in na [ ... ]


More News

 

 

 

Last Updated ( Wednesday, 02 October 2013 )