I have heard that Java must use a JIT to be fast. This makes perfect sense when comparing to interpretation, but why can\'t someone make an ahead-of-time compiler that gener
Java's JIT compiler is also lazy and adaptive.
Being lazy it only compiles methods when it gets to them instead of compiling the whole program (very useful if you don't use part of a program). Class loading actually helps make the JIT faster by allowing it to ignore classes it hasn't come across yet.
Being adaptive it emits a quick and dirty version of the machine code first and then only goes back and does a through job if that method is used frequently.