3 ms·
Not that unusual. In fact the planned architecture sounds exactly like HotSpot: a fast assembly based interpreter that profiles the code, with tiered fast/slow
by mike_hearn 11y ago
Not that unusual. In fact the planned architecture sounds exactly like HotSpot: a fast assembly based interpreter that profiles the code, with tiered fast/slow compilers producing machine code for hot spots, with deoptimization support to allow more speculative optimisations.
It actually seems a bit of a shame that V8 and Nashorn are competing despite heading towards very similar architectures.
- vitalyd 11y agoI got the same impression from a cursory read. Profiling in the interpreter has its downsides, chief among them is lack of inlining causing profiles sometimes to be less useful. Tiered compilation can help here, but requires more careful code cache management.
- gsg 11y agoHaving TurboFan compile the interpreter from machine-independent templates is what struck me as unusual. The rest is familiar enough, true.
- mike_hearn 11y agoThe HotSpot interpreter is done the same way, I believe. It's also a template based interpreter.