Answer the question
In order to leave comments, you need to log in
How does .NET work?
When I click build project (green arrow) in Visual Studio, what happens?
I understood this: the compiler converts the code into an intermediate byte code, which is called CIL (MSIL). This code is executed by the CLR, which includes the JIT compiler, into native code. It turns out exe.
Does CLR not include CIL?
Does the JIT run every time the project is built, or just once to remember the architecture of the platform?
Answer the question
In order to leave comments, you need to log in
the code turns into IL, which will already turn into machine language as needed (see JIT compilation). Those. in fact, the first method call will take a little longer. IL code will be optimized and compiled for a real hardware platform. After that, all subsequent calls will be executed faster. If for some reason this option is not suitable, there is ngen that allows you to immediately compile the code for a known platform (winning on cold launches, but losing portability). And in this case, jit compilation will not be performed while the application is running.
Does CLR not include CIL?
Does the JIT run every time the project is built, or just once to remember the architecture of the platform?
When you press the "green button" the following happens:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question