How can we run a Java or C# program without JIT help?
pseudocode:
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
}
How to compare the performance of this program when JIT is enabled/disabled?
It is not possible to run .NET code without a JIT, even with Mono (its bytecode interpreter is not supported any more).
It is possible to turn the JIT off for many JVM implementations, e.g., -Xint
for Sun JVM.