←back to thread

49 points Bogdanp | 1 comments | | HN request time: 0.298s | source
Show context
nynx ◴[] No.44469206[source]
I must be missing something here. How would this help predict interpreter dispatch? Those won’t be a function of previous branch history or pc, which may very well be independent of the next opcode. They’d be a function of state in memory or registers.
replies(4): >>44469293 #>>44469360 #>>44469495 #>>44469524 #
1. brigade ◴[] No.44469360[source]
In a hot loop, the next opcode can be predicted quite well from the history of previous opcodes executed, especially once have a couple iterations available in your history. And the opcodes executed in an interpreter are generally equivalent to the dispatch branch target.