Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

How does it know where to jump to?


view as:

The 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.

Legal | privacy