Chapel supports recursive function calls, but does it support tail call optimisation so that tail recursion does not use an extra stack frame?
3
votes
1 Answers
4
votes
I'm reasonably certain that the Chapel compiler does not implement tail recursion optimizations itself. Depending on the complexity of the function, it may be that the back-end compiler (C compiler or LLVM) would perform such optimizations on the generated code.
[Edit: This characterization is for versions 1.14 and earlier of the Chapel compiler]