Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between RyuJIT and Roslyn?

I understand that RyuJIT is a quicker compiler than JIT. But is it the new standard for the .NET 4.6 or is that Roslyn?

Or is it that Roslyn is used when you need to expose APIs during the compilation process?

I'm confused between their purposes and what frameworks they'll be found in. Can someone explain the difference & when you want one over the other, please?

like image 509
myfunnyfella Avatar asked Jul 12 '16 23:07

myfunnyfella


People also ask

How many types of JIT compilations do you know?

There are three types of JIT compilers: Pre-JIT: Compiles the entire source code during compilation and is used at the time of deployment. Econo-JIT:Compiles methods that are called during run time.

What is Ryu JIT?

RyuJIT is the code name for the . NET just-in-time compiler, one of the foundational components of the . NET runtime. In contrast, the Roslyn C# compiler compiles C# code to IL byte code. The RyuJIT compiler compiles IL byte code to machine code for multiple processors.


2 Answers

Roslyn is the compiler that compiles your code (C# or VB) to IL.

RyuJIT is a Just In Time compiler that compiles your IL to native code.

Both of them are now open source.

Roslyn

RyuJIT, Tutorial

Roslyn API is what you need if you want to play with syntax tree, compilation, and semantic model.

RyuJIT doesn't have a public API.

like image 143
Dudi Keleti Avatar answered Oct 11 '22 19:10

Dudi Keleti


Roslyn is a compiler that takes your source code and generates IL bytecode. RyuJIT takes said bytecode, at runtime, and generates native code. You can embed Roslyn into an app to compile source code on the fly, but RyuJIT is strictly for the runtime and cannot be accessed as far as I know.

like image 34
Joel Lucsy Avatar answered Oct 11 '22 20:10

Joel Lucsy