Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can't count on it in the general case even with gcc (even when taking care to heed the restrictions like not passing pointers to data on the stack, and putting all functions into the same compilation unit). I did tests a couple years ago where it would compile up to about a handful of mutually recursive functions with TCO, then when you added one more, it would disable TCO. I guess because some algorithm will stop analyzing the call graph past a certain mark and then disallow TCO from being applied.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: