6 ms·
I thought modern processors had enough branch prediction that threaded interpreters were no longer faster than a normal switch loop. Wonder if that also applie
by hinkley 6y ago
I thought modern processors had enough branch prediction that threaded interpreters were no longer faster than a normal switch loop.
Wonder if that also applies to aarm64
- rkangel 6y agoThe BEAM runs on a variety of targets from your superscalar out-of-order targets like x64 down to much more embedded things. This may affect the performance tradeoffs.
- jeff-davis 6y agoWouldn't the branch predictor be overwhelmed at some point?
- Joker_vD 6y agoThey do, but a switch loop has only one indirect branch which can got to $INSTRUCTION_COUNT different places, and with direct threading there are $INSTRUCTION_COUNT branches, and different branches have separate histories.
- cygx 6y agoSupposedly, some relevant performance characteristics changed after Spectre mitigations got implemented. I never got around to looking into this, and have no idea how things stand right now...