4 ms·
I wrote a FORTH for ARM which inlined short definitions (eg stack manipulation) then did peephole optimization keeping the stack in registers for that word. Th
by nickcw 11mo ago
I wrote a FORTH for ARM which inlined short definitions (eg stack manipulation) then did peephole optimization keeping the stack in registers for that word.
The compiled code came out looking quite nice. I'm sure a decent C compiler would have done better, but it wasn't bad at all.
It meant all the stack noise was compiled as register move instructions leaving only calls to chunky words which were too big to inline.