Java has 2 compilers - C1 abs C2. C1 originated from client jvm and C2 from server jvm. C1 is more aggressive in the sense that it started to compile code earlier than C2. C2 observes the execution longer before compilation and generated more optimised code than C1. This made sense in the past as client code tends to run shorter and thus earlier compilations will be beneficial. Server side code tends to run longer and a more optimized code is beneficial in long run.
Presently, jvm uses both C1 and C2 compiler. It is called tiered compilation. Code will be first compiled with C1 and hotter code will then recompile with C2
No comments:
Post a Comment