Take the 2-minute tour ×

Reading a blog entry by Eric Lippert, I came across this snippet:

...you're going to either loop forever (if you're on an architecture that can optimize tail calls) or run out of stack and crash the process.

I'm aware that a compiler can optimize tail recursion, but what does an architecture that can optimize tail calls mean?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

It means that the .NET JIT on x64 behaves differently to the JIT on x86 - the x64 one applies tail call optimizations much more aggressively.

See this blog post from 2007 and this one from 2009 for some implementation details (not to be depended upon) for some of the rules that are followed.

share|improve this answer
Not to mention different CLRs, like Mono, Rotor, Silverlight, or Windows Phone. –  Gabe Aug 19 '11 at 17:39

Your Answer


