Is JRE with JIT much faster then a JRE with notmal java interpreter?

drKnows :

Recently i upgraded the JRE in my linux machine from 1.7 +JIT to 1.8 without JIT and noticed a huge degredation in performence, does Just In Time compilation JVM much faster then JVM with interpreter? Thanks,

GhostCat salutes Monica C. :

The whole intent of the JIT is to speed up code execution.

The major thing to remember: the JIT adds a "warm up" phase. The JVM has to spent to analyse what your code is doing, to then decide which parts to compile to machine code. And of course, that compilation step also requires a lot of time. But as soon as a method is compiled into machine code, of course it will be orders of magnitude faster.

But please note: I noticed a huge degradation in performance is an almost pointless statement. Performance only makes sense given context. Meaning: the context of workload (what are you running) and actual, real numbers.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=103845&siteId=1