官术网_书友最值得收藏!

.NET Native and JIT compilation

JIT compilation is done mostly at runtime, and it converts the MSIL code to the native machine code. This is when the code is run the first time, and it takes a little bit more time than its successive runs. In .NET Core today, we are developing applications for mobile and handheld devices that have limited resources in terms of CPU power and memory. Currently, the Universal Windows Platform (UWP) and the Xamarin platform run on .NET Core. With these platforms, .NET Core automatically generates that native assembly at compilation time or while generating the platform-specific packages. Though it does not require the JIT compilation process to be done at runtime, this eventually increases the performance of the application's boot-up time. This native compilation is done through a component known as .NET Native.

.NET Native begins the compilation process after the language-specific compiler finishes up the compilation process that is done at build time. The .NET Native toolchain reads the MSIL generated from the language compiler and performs the following operations:

  • It eliminates the metadata from the MSIL.
  • It replaces the code that relies on reflection and metadata with the static native code when comparing field values.
  • It checks the code that is invoked by the application and includes only that in the final assembly.
  • It replaces the full CLR with a refactored runtime that contains the garbage collector and no JIT compiler. The refactored runtime goes with the app and is contained in the assembly named mrt100_app.dll.
主站蜘蛛池模板: 荆门市| 石家庄市| 富顺县| 德安县| 安西县| 云林县| 噶尔县| 弥勒县| 甘孜县| 宜宾市| 鹤壁市| 绥化市| 微博| 大关县| 桂平市| 定远县| 无极县| 澎湖县| 勃利县| 美姑县| 阳原县| 襄汾县| 忻城县| 尚义县| 溧阳市| 浪卡子县| 黄浦区| 剑河县| 娄底市| 酉阳| 东乡县| 金川县| 盈江县| 高要市| 基隆市| 浦城县| 乌鲁木齐县| 全南县| 泸溪县| 冷水江市| 安庆市|