9 ms·
Wow - thank you once more for the answer and the links! I tried a simple JiT once that did code threading by jmp/ret - seems like that would not be any better
by vnorilo 7y ago
Wow - thank you once more for the answer and the links!
I tried a simple JiT once that did code threading by jmp/ret - seems like that would not be any better today :D
tldr; prefer trampolines over weird stack tricks.
- BeeOnRope 7y agoYes, jmp/ret will be slow. call/ret has to particular advantage over e.g. storing the return address in a register (say 15) and then `jmp [r15]` - other than the prediction, so if you can't use the prediction, jmp/jmp indirect should work fine.