Why do CLR
need JIT
compiler to complie IL
to machine code when it has NGEN
that does that work at the time of installation.
One more question, how JIT
will complie IL
code if it is already NGENed?
When NGEN or AOT is a good fit: great, go do that. But it isn't a magic wand that solves every problem.
One more question, how JIT will complie IL code if it is already NGENed?
Assuming that all the preconditions for the NGEN image being a perfect match are satisfied, then the JIT won't need to be involved.
This post has some explanations why NGEN
might be not as attractive as it sounds.
And here there are very old recommendations from Microsoft when to use NGEN
.
One more question, how
JIT
will complie IL code if it is already NGENed?
If runtime decides that recompilation is required - it'll ignore NGENed image altogether.