MickAA
MickAA

Reputation: 21

.NET : How to use JIT compiler

I would like to use directly the .NET JIT Compiler, is it possible ?

I mean, I would like to do a thing like :

?> jit.exe myfile.msil myfile.exe

Or in a c# code ?

Upvotes: 2

Views: 328

Answers (1)

Jon Skeet
Jon Skeet

Reputation: 1500665

I think what you're looking for is roughly ngen.

Note that although this generates native code:

  • It still runs within the CLR (the managed runtime)
  • The original IL is still maintained (so it can be recompiled if the processor has changed or something similar)
  • The optimizations performed by ngen and the JIT can differ

IMO, ngen is usually not appropriate... what are you trying to do?

Upvotes: 3

Related Questions