On Wednesday, 23 December 2015 at 01:07:57 UTC, Walter Bright wrote:
On 12/22/2015 10:29 AM, David Nadlinger wrote:
Not sure about how it arrives at the crazily unrolled loop, but no recursion in
sight anymore.

It's doing tail recursion optimization, which turns the recursion into a loop.

The recursive call is not quite a tail call by itself, which is what Andrei pointed out using that example. But yes, that's what happens.

Then the loop is unrolled 8 times.

Sure thing. I was rather surprised to see that happen given that I only compiled with -O1, though, as it seems to be quite an aggressive optimization.

 — David

Reply via email to