java - With the help of JIT, the longer program runs, the faster it is? -


i've tried run java program in pure interpreted mode , speed of program intolerable.

as time elapses, jit should able compile more byte-code native code, therefore program should run faster. right? if application(such tomcat) runs several weeks, months, possible jit has compiled of byte-code native code?

i appreciate answers, thanks!

with of jit, longer program runs, faster is?

up point yes. once matters has been jit compiled, stop getting faster.

if application(such tomcat) runs several weeks, months, possible jit has compiled of byte-code native code?

it possible code have been jit compiled. possible code won't have been jit compiled.

the granularity of jit compilation method. jit compiler decides jit compile method after interpreter notices has spent more amount of time running it. if have method never called, won't jit compiled.

not matters. if method never or hardly ever used, fact (still) interpreted has minimal influence on performance.


as joop eggen points out there other issues can cause long running program slow down ... or speed up. example:

  • slowdowns can caused resource leaks of various kinds.

  • speedups can due stabilization of heap storage management ("warmup") , population of caches.


Comments