3 ms·
C++: > All current mainstream compilers perform tail call optimisation fairly well (and have done for more than a decade) https://stackoverflow.com/questions/
by Thorrez 2y ago
C++:
> All current mainstream compilers perform tail call optimisation fairly well (and have done for more than a decade)
https://stackoverflow.com/questions/34125/which-if-any-c-compilers-do-tail-recursion-optimization https://stackoverflow.com/questions/34125/which-if-any-c-com... (2008)
- hyperbrainer 2y agoI couldn't actually figure out whether this TCO being done "fairly well" was a guarantee or simply like Rust (I am referring to the native support of the language, not what crates allow)
- Thorrez 2y agoWhen that SO answer was written, it was not a guarantee. You can now get a guarantee by using non-standard compiler attributes: https://clang.llvm.org/docs/AttributeReference.html#musttail https://clang.llvm.org/docs/AttributeReference.html#musttail https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#index-musttail-statement-attribute https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html...