Hacker News new | ask | show | jobs
by SeanLuke 2828 days ago
Which compilers can rearrange fib, with two recursive calls, into being tail recursive?
2 comments

If it knows it's a pure function, it's possible. It'd have to be a very specific optimization pass though.
Any LLVM-based compiler. GCC.