none
Can runtime JIT code generation be disabled? RRS feed

  • Question

  • No there's no good reason to, but is it possible nonetheless to force IL bytecode to be interpreted rather than JIT compiled and executed as native code? I.e. can I disable JIT? Thanks.
    Sunday, March 7, 2010 8:38 PM

Answers

  • .NET does not come with an IL interpreter, so the code is always JIT compiled before execution.  The worst thing someone could do is set the debug flag in a library to force non-optimized compilation, I suppose.
    Monday, March 8, 2010 7:41 AM

All replies

  • Hi, Alpha:
        I am not quite sure about your scenario. If you just want to view the IL, there's good tool such as ILDasm for that purpose. So what are you trying to achieve?
    Please mark the right answer at right time.
    Thanks,
    Sam
    Monday, March 8, 2010 2:44 AM
  • Thanks for replying. I'm curios if a user of my application could, through an overabundance of ineptitude and/or cleverness, disable JIT and impale performance. And admitedly I'm curious too to see what happens. Is there a registry value, machine.config value, etc, that could cause the .NET framework to interpret IL bytecode instead of compiling it to native code?
    Monday, March 8, 2010 3:03 AM
  • .NET does not come with an IL interpreter, so the code is always JIT compiled before execution.  The worst thing someone could do is set the debug flag in a library to force non-optimized compilation, I suppose.
    Monday, March 8, 2010 7:41 AM
  • No, there's no IL interpreter. As far as I know, the only thing you can do is the exactly the opposite: using NGEN to pre-compile your IL into machine code.
    -- Blog: http://geeklyeverafter.blogspot.com/
    Monday, March 8, 2010 3:04 PM
  • The microsoft implementation does not ship with an interperter so disabling the jit is not an option, mono does ship with an interperter though

    Monday, March 8, 2010 3:27 PM
  • Thank you! Although I do take you three's word for it, it's difficult to prove a null result. Can you cite any official references?
    Monday, March 8, 2010 7:42 PM
  • There is no official reference to CLR internal implementation details. Nonexistence of interpreter is such internal implementation detail as it doesn't affect public surface for applications.
    JIT and ngen are the only options.

    -Karel
    Monday, March 8, 2010 8:03 PM
    Moderator