
Originally Posted by
frantaylor
JIT will NOT help you write fast loops. The JIT runtime will not fit in the processor's cache, your program will score many cache misses and the loops will slow down.
Your processor is running at many GHz, but main RAM is terribly slow, you don't want your loops to be fetching from RAM on every instruction.
If you carefully hand-code your loops you can fit the whole thing in the fast cache and the loop will scream.
As was otherwise pointed out, JIT will mitigate bad code, but if the code is solid in the first place, it's not going to help.
Use the right tool for the job! JIT gives you a VM, memory safety, and nice debugging features. It won't magically fix your bad algorithm or improve performance of an otherwise optimal program. JIT also means big runtime baggage and potential compatibility issues if the customer has a different version.