4 ms·
> Java HotSpot takes a fascinating approach: they do a quick compilation on the first pass, but if the VM detects that a piece of code is being used a lot, the
by SeanLuke 15y ago
> Java HotSpot takes a fascinating approach: they do a quick compilation on the first pass, but if the VM detects that a piece of code is being used a lot, the VM recompiles the code with all the optimization turned on and then they hot-swap the code.
Wait, what? Hotspot does a "quick compile" on the first pass? When did this happen?
- lucian1900 15y agoSome time ago. It has a "pasting" JIT for as a first optimisation stage, which just pastes together machine code for each opcode, to remove the overhead of interpreting. Note that it does just interpret by default.
- SeanLuke 15y ago> It has a "pasting" JIT for as a first optimisation stage Could you point to somewhere on the interweb which discusses this in detail?