managed code execution quick question RRS feed

  • Question

  • HI,

    I would like somebody to tell me if I am correct:

    Afaik when the .net assembly is deployed, it is deployed as dll with IL code. With the first use of it, the code is being compiled by JIT compiler and the code is being profiled for the execution with underlying cpu. It involves some overhead when the piece of code is executed for the first time, but for later executions, the compiled code is "cached" and the execution is immediate.

    Are these sentences correct?

    And one more question:
    After the code is run for the first time, and optimized code is created in memory, what happens with the optimized code when the program is shut down? Does the whole process of optimization start again every time program is run?

    Lukasz Podolak
    Monday, February 25, 2008 8:20 AM


  • Sounds about right. A method only needs to be JIT compiled once, as long as the application is running. The native code is lost when the application exits so JIT compilation has to be done again the next time the application runs.


    Monday, February 25, 2008 8:38 AM