Re:Rust will likely not support tail call optimization
by cwzwarich on Wednesday April 10, 2013 @04:56PM
(#5528104)
They could also add their own calling convention to LLVM to support what they want like GHC and HiPE have done.
[ Parent
| on HN ]
Re:Rust will likely not support tail call optimization
by saidajigumi on Wednesday April 10, 2013 @09:03PM
(#5529266)
No they can't, at least not without compromising on several points laid out in TFA. Mainly these two:
- Tail calls also "play badly" with assumptions in C
tools, including platform ABIs and dynamic linking.
- Tail calls require a calling convention that is a
performance hit relative to the C convention.
See other posts in this discussion for examples of the impacts of some alternate calling convention choices.