There is not enough difference between NGen and RyuJIT to make you happy. They perform very different tasks, NGen is compressed ahead of schedule and RyuJIT is compressed during the process. But NGen does not have his own trembling, he asks RyuJIT to do the job. The generated machine code is not fundamentally different. There are several optimizations that cannot be performed in advance, the code with the modified code is a bit slower.
Technically, NGen can do a better job, as the optimizer can spend more time analyzing the code and finding the best optimization. But Microsoft does not use it. Itβs not entirely crystal clear why they have nothing to do with their support number 1-800. Code optimization is always the most risky part of the code generator, and errors in existing fluctuations have always been optimization errors. That this may change once is unthinkable.
You will be ahead when you can take advantage of .NET Native. It generates code ahead of time using the C ++ back-end compiler. But at present and, of course, for quite some time, it is only supported for packaged applications. In a store that ships through the Windows Store, you need to target Store, Phone, or Universal and use the Store as a vehicle for deployment. The package is very important in order to make .NET Native work, only a decent way to see what code needs to be translated. And it often still needs help to get it right, Reflection is a difficult problem to solve, the reason you use it on your machine. Note that for NGen, the same problem does not exist; it still relies on jitter to get some code in time. Like the target reflection code and generics. That this may change once is unthinkable.
As noted, the NGen code is a bit slower. Therefore, if you do not need a warm start delay, you do not want to use NGen.
Last but not least, RyuJIT does not generate faster code than its predecessor. Which have already done a very decent job of optimization. Too decent. The RyuJIT project started having problems with the obsolete x64 jitter, which was quite fundamental in the code base and could only be resolved with a sharp rewrite. Optimization was one of them; it did not have an upper bound on the time spent on it. Giving him very unreasonable break times on great methods. Therefore, if you want to squeeze the last ounce, and then deliberately disable RyuJIT so that it returns to legacy x64 jitter, you should try.
source share