It is great that using Intermediate Language (.Net: MSIL, Java: Bytecode) we can achieve platform independence. But when an application is supposed to run on a single platform only (e.g. Windows), in that case is there any simple way to specify that “I don’t need JIT every time just give me the native code.”?
It is great that using Intermediate Language (.Net: MSIL, Java: Bytecode) we can achieve
Share
Single platform (Windows) doesn’t really mean single target. I’m currently running on Windows – and some binaries are x86, and some are x64. Even within the same processor family, different specific chips have different abilities that the JIT could take care of.
On .NET you can use NGEN – but personally I would see how much benefit there is before you actually use it in production. I believe the main benefit is in terms of start-up time rather than performance when actually executing. In fact, I believe there are some optimizations that the “normal” JIT can make which NGEN won’t.
One point to note is that although the Hotspot JIT for Java is adaptive as Dolda2000 mentions, the .NET JIT is currently “once only” – it won’t re-JIT code putting in more effort if it turns out to be very heavily used, or make assumptions around subclassing and then “undo” them later.