Tail call is a different matter…
https://arcb.csc.ncsu.edu/~mueller/cluster/ps3/SDK3.0/docs/a...
The impact of a branch miss is a particular pipeline stalls to flush the incorrect prediction. If there were resources available for the other branch to be speculatively executed concurrently and in parallel it might take less wall time.
nynx•3h ago
achierius•3h ago
nynx•3h ago
brigade•3h ago
saagarjha•2h ago
dzaima•2h ago
The question here is about all other branching the interpreter will do. i.e. even if you have a unpredictable `if (a+b < 0)`, there's still the dispatching to the "load-variable" and "add" and "load-constant" and "less-than" and "do-branch" opcodes, that still will benefit from being predicted, and they could very well if you have it repeated in a loop (despite still having a single unpredictable branch), or potentially even if you just have a common pattern in the language (e.g. comparison opcodes being followed by a branch opcode).