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

Profile guided optimization

Profile-guided optimization (PGO) is a compilation technology used by C++ compiler to generate optimized code. It applies to the internal native compiled components of the runtime and JIT. It performs compilation in two steps, which are as follows:

  1. It records the information about code execution.
  2. From this information, it generates better code.

The following diagram depicts the life cycle of how the code is compiled:

In .NET Core 1.1, Microsoft already released the PGO for Windows X64 architecture, but in .NET Core 2.0, this has been added for both Windows X64 and X86 architectures. Also, as per observatory results, it was noted that the actual startup time is mostly taken by coreclr.dll and clrjit.dll for Windows. Alternatively, on Linux, there are libcoreclr.so and libclrjit.so, respectively.

Comparing RyuJIT with the old JIT compiler known as JIT32, RyuJIT is more efficient in code generation. The startup time of the JIT32 was faster than the RyuJIT; however, the code is not efficient. To overcome the initial startup time taken by the RyuJIT compiler, Microsoft used PGO, which brought the performance closer to JIT32 performance and achieved both efficient code and performance on startup.

For Linux, the compiler toolchain is different for each distro, and Microsoft is working on a separate Linux version of .NET that uses the PGO optimizations applicable to all distros.

主站蜘蛛池模板: 泾川县| 太和县| 通化县| 越西县| 墨竹工卡县| 祁门县| 交口县| 沙坪坝区| 东丰县| 阳西县| 来安县| 含山县| 慈溪市| 韶山市| 隆德县| 汉中市| 桂平市| 简阳市| 奉新县| 米易县| 新龙县| 错那县| 凤山县| 南江县| 胶州市| 称多县| 涿鹿县| 乌海市| 漳州市| 大关县| 清原| 巴塘县| 铜鼓县| 昌宁县| 陵川县| 苏尼特右旗| 清苑县| 油尖旺区| 兰坪| 吉首市| 凉山|