JIT

  • Thread starter Thread starter Mike Peretz
  • Start date Start date
M

Mike Peretz

For those of you coding windows Application under the framework you must
noticed that forms take a performance hit loading the first time. This is
because of JIT, I was able to fix this behavior by using ngen.exe, but then
I don't get the same optimization JIT gives me and it is a headache for
installations (negen has to be called right after the installation).



According to Microsoft, a function gets JIT to native code the first time it
is accessed. Is it possible to tell the framework to JIT certain functions
at runtime without actually calling the functions?



Basically, I would like to pre-JIT some of my functions so they don't
experience a performance hit the first time they are called.



Is this possible?
 
Mike,

Have you considered using NGEN.EXE? This utility creates a native image from
a managed assembly. You could put your functions in a separate DLL, and use
this utility to pre-JIT your code.

See the NGEN.EXE documentation in the .NET Framework SDK Documentation for
more details.

Gabriele
 
Yes I know about negen.exe

I rahter use JIT, it has better optimization - but I want to control JIT at
run time.
 
Back
Top