Hi!
> I understood the reason is that when ever application runs first JIT
> compiler recompiles the assembly and generate a native code that is
> fully compatible to our current CPU specifications if the assembly
> doesn't have a native image in its cache. Later it uses from cache
> hence it executes fast.
From the CLR's point of view, the generation of native code happens "in
place". The JIT-Compiler compiles the IL in memory.
> My doubts comes here, when application runs first it generate native
> code and added to cache then why I am not able to see using the below
> command
>
> ngen display "Assmblyname" it gives me below error.
ngen has little to do with the JIT-Compiler. When you use "ngen", the
Compilation is done once, and the compiled native Code is saved within a
file.
You have to use the
ngen install "Assemblyname"
command for this.
After installing the native image, the JIT doens't need to be called by the
CLR at runtime, so executing the Assembly will be faster.
GP