2 ms·
> instead of loading the address and jumping to it push the address then return to it I remember doing that in a code generator ages ago because it was easier
by badsectoracula 4y ago
> instead of loading the address and jumping to it push the address then return to it
I remember doing that in a code generator ages ago because it was easier than calculating the jump offset :-P
- Taniwha 4y agoevery subroutine return after that would be miss-predicted
- badsectoracula 4y agoFWIW i wasn't trying to make an optimizing compiler, i was experimenting with replacing an interpreter for a scripting language with a JIT, so even bad native code was still faster than the interpreter :-). It wasn't really used anywhere, eventually i decided to keep the interpreter and move any complex logic in C which ultimately was the simpler approach (and which has been my take on scripting languages for years now: use scripting languages for the "what" and native code for the "how").