3 ms·
How does it know where to jump to?
by immibis 3y ago
How does it know where to jump to?
- deleted 3y ago[deleted]
- chuckadams 3y agoThe jump target is compiled into the bytecode, so rather than return to the big switch statement, it jumps straight to the next opcode's implementation. The process is called "direct threading". These days a decent switch-based interpreter should fit in cache, so I'm not sure direct threading is much of a win anymore.