Today I have read an article about the new .Net Native on MSDN.
"Windows Store apps start up to 60% faster with .NET Native and have a much smaller memory footprint. Our first release is a Developer Preview that allows you to develop and test apps with this new compiler. This preview release of .NET Native offers you the performance of C++ with the productivity of C#".
Of course, this is really interesting but If .Net Native is a new compiler which gives good performance then why we needs to go for RyuJIT. What is this new .Net Native? What is the difference between new .Net Native and RyuJIT, also Microsoft released compiler as a service called Roslyn. So how Roslyn supports this new .Net Native.
Roslyn
compiles code to IL.RyuJIT
is different, it compiles IL to machine code during runtime. It is an improvement over existing x64 JIT..NET Native
is a minimal CLR runtime. The compilation technique involves first compiling code to IL (for eg via Roslyn) which is then compiled to machine code (using VC++ compiler) before run. The benefits are faster startup, execution times etc but compilation takes longer. .NET Native apps aren't cross-platform. There's LLVM basedLLILC
which aims at compiling IL to machine code ahead of time just like .NET Native but also be cross-platform. – GiantRoslyn
= C# to IL.RyuJIT
= IL to MC, JIT..NET Native
= IL to MC, AOT.LLILC
= IL to MC, AOT (in future), cross-platform. JIT means during runtime, AOT means before runtime. Project-wise, UWP Apps (in release mode) =Roslyn
+.NET Native
. Other =Roslyn
+RyuJIT
. This msdn blog gives a good picture. – Giant