Re:My experience crafting an interpreter with Rust (2021)
by User23 on Saturday March 25, 2023 @11:42PM
(#35310621)
Tail call optimization isn’t just for recursive functions. Any tail call can be optimized to little more than a jump, which makes implementing threaded code or similar much nicer. Your compiled code will just push the instruction pointer along an array of opcodes in a tight loop with no function call overhead.
[ Parent
| on HN ]
Re:My experience crafting an interpreter with Rust (2021)
by shadowofneptune on Sunday March 26, 2023 @01:21AM
(#35311271)
Exactly, though I do not see how it is not an example of recursion.