none
ngen output RRS feed

  • Question

  •  Hi, I'm taking a deep look at .Net optimizations and have a question about ngen.  Given the same IL on the same machine, would ngen give different output than JIT would?  Obviously there would be differences in how the code is executed and etc, but what about the actual machine code?  If so, how would the output differ?

    Thanks for your time
    Monday, August 4, 2008 4:11 AM

Answers

  • No, Ngen.exe uses the exact same JIT compiler.  In general, ngen-ed code is a bit less efficient.  This magazine article tells you why.
    Hans Passant.
    • Marked as answer by pdev.mich Monday, August 4, 2008 9:03 PM
    • Marked as answer by pdev.mich Monday, August 4, 2008 9:03 PM
    • Marked as answer by pdev.mich Monday, August 4, 2008 9:03 PM
    Monday, August 4, 2008 12:05 PM
    Moderator

All replies

  • No, Ngen.exe uses the exact same JIT compiler.  In general, ngen-ed code is a bit less efficient.  This magazine article tells you why.
    Hans Passant.
    • Marked as answer by pdev.mich Monday, August 4, 2008 9:03 PM
    • Marked as answer by pdev.mich Monday, August 4, 2008 9:03 PM
    • Marked as answer by pdev.mich Monday, August 4, 2008 9:03 PM
    Monday, August 4, 2008 12:05 PM
    Moderator
  • nobugz,

    Thanks for the response.  I assumed it was the same output and used the same compiler but I wanted a second opinion.
    Monday, August 4, 2008 9:03 PM