Forcing Aggressive JIT

As .net matures, JIT's capabilities have been improved to be brilliantly lazy. That is, do not create machine code if it is not needed. All in all, this is good.

However, if I try to defrost an application , I may prefer an aggressive JIT position. Is there a way to configure a .net application so that all class methods make up JIT, simply because the class was created?

If so, my favorite object creation template can create an instance of the application's graph object, and I will have everything JIT-ready at the same time. That would be good.

Can this be done?

+6
source share
2 answers

As an additional note, you can use NGen.exe to create your own image of your DLL during deployment (NB: this is not an ideal solution - since it has some disadvantages - read the documentation carefully)

+2
source

you mean, you want everything to accumulate earlier :-)

They finally did it for you - announced at Build 2014 :

Somasegar told me that the developers told Microsoft that .NET was always a very productive programming language, but it didn’t always deliver which they were looking for. "We worked on a lot of innovation to show developers that .NET is still a very viable platform for developers who want to create applications in this modern world," he said. With the built-in .NET compiler installed in the future, developers see faster startup time, lower memory usage and overall performance improvement, Microsoft promises. This new feature is currently in preview and allows developers to orient both the X64 and ARM platforms.

You can try it (preview only at the moment and, possibly, working only for universal applications, therefore YMMV on how useful it is), more detailed information is available on MSDN

0
source

Source: https://habr.com/ru/post/974497/


All Articles