如何在没有JIT的情况下运行程序?

Azo*_*ous 0 c# java compiler-construction jit runtime

如何在没有JIT帮助的情况下运行Java或C#程序?

伪代码:

for(int i=0; i<100; i++)
{
    // open file in append mode
    // remove last line
    // add a line
    // close the file
    // if any exception occurs, continue with next iteration
}
Run Code Online (Sandbox Code Playgroud)

如何在启用/禁用JIT时比较该程序的性能?

SK-*_*gic 5

即使使用Mono也不可能在没有JIT的情况下运行.NET代码(不再支持其字节码解释器).

对于许多JVM实现,例如,-Xint对于Sun JVM ,可以关闭JIT .