.netclrjitngen

Why JIT if we have NGEN


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?


Solution

  • 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.