This post shares more details about our new .NET 64-bit Just-In-Time (JIT) compiler. It was written by Kevin Frei, Development Lead for the CLR JIT team.
RyuJIT received a great response with its RyuJIT: The next-generation JIT compiler for .NET announcement post. Thanks! It was great to see all of the questions. In this post, we’d like to answer your questions and give you a better sense of where RyuJIT is headed.
RyuJIT generates code more quickly. How good is the generated code?
At release, RyuJIT will be both much faster at generating code, and generate code that is as good or better than the current x64 JIT. RyuJIT CTP1 is our first public release of the JIT. Currently, RyuJIT generates code that is roughly similar to the existing x64 JIT. We’ve been focused strictly on correctness. Yes, we have some code optimizations enabled, but we haven’t spent much time tuning for quality yet. We are working on that now, and expect to deliver a future CTP that delivers more optimizations.
Is Feature X supported? Will it be supported?
We are close to, but not quite at, feature parity with the current x64 JIT in .NET 4.5.1. We plan to match the x64 JIT feature-for-feature when we ship RyuJIT as the JIT compiler in .NET.
- Tail call elimination: RyuJIT CTP1 supports IL tail-prefixed calls (used a lot in F#), but we do not yet support “opportunistic tail calls”.
- Edit & Continue: We do not yet support it, so if you’re using Visual Studio 2013 with RyuJIT CTP1, you’ll find that it’s falling back to the current x64 JIT frequently, because that’s what RyuJIT does when it sees a feature that it doesn’t yet support. This is in the works, and will be in the next CTP release.
- NGEN: We do not allow RyuJIT CTP1 to generate NGEN images. NGEN images, particularly for the .NET Framework, are used by many apps on your machine, like Visual Studio. CTP1 is solely intended for trying out RyuJIT with your app code. Inside of the CLR team, we use RyuJIT as both the JIT compiler and the NGen compiler for our x64 daily builds & testing.
Do you plan to support other features?
We do! We hope to be able to deliver some very exciting features that people have been asking for over the years. So keep giving us your suggestions and feedback: we’re listening! Just email us: RyuJIT@microsoft.com. You can also post and vote on suggestions on .NET UserVoice.
I have a piece of code that is really slow on JIT64. Is it now fixed?
Send it to us to test! We may even blog it as an example if that’s OK. We know of a number of slow algorithms in JIT64, some of which are O(N^2) for both time & space. We’d love to demonstrate that RyuJIT is a big step forward over JIT64.
Will RyuJIT replace JIT32 and JIT64 codebases? What about x86 and ARM architectures?
Yes, RyuJIT is our new JIT compiler codebase going forward. We’re focused on getting a first architecture complete, which is X64. After that, we’ll need to talk with customers, including internal ones, to determine the order of the other architectures. We know that x86 is high on everyone’s lists.
Why Windows 8.1/Windows Server 2012 R2 only?
We chose to focus our engineering effort on the latest OS, in order to deliver RyuJIT sooner. During the CTP phase, RyuJIT will be supported on Windows 8.1 and Windows Server 2012 R2. Once we have finished building RyuJIT, we will expand the set of supported OSes.
Why now? X64 isn’t new.
RyuJIT is much more than an X64 JIT, but is headed towards becoming the single JIT code-base for .NET. We saw the need to build RyuJIT several years ago, knowing that we needed a single JIT code-base to support a common set of JIT compiler features across multiple processors.
Over the last few years, the JIT team has also delivered other JIT updates. One of those was the MDIL (Triton) compiler for Windows Phone 8. For the last year, we’ve been able to focus on RyuJIT, allowing us to get to the point of publishing a CTP.
When is the next CTP coming?
RyuJIT CPT1 has already been updated, as of early November. A small hand-full of bugs (5) were reported from folks testing RyuJIT, which have been fixed in the update. Thanks! We sent mail in response to all of the bug reports we received, with early access to the updated CTP. Please keep those bug reports coming.
Why RyuJIT? How was the name chosen?
Compiler developers and many computer science college students will be familiar with the canonical compiler book referred to as The Dragon Book. Ryū in Japanese means “dragon” so RyuJIT is the “dragon JIT”. As a team, we’re also looking forward to yelling “Hadouken!” when we finally ship.
You can help – tell us which feature to prioritize
I want to know more about RyuJIT!
There is more to come with RyuJIT. Please tell us if there is something specific that you want to know about RyuJIT. Reply in the comments or mail us @ RyuJIT@microsoft.com. You can also talk to us @dotnet.