Re:GodBolt: Enter C, get Assembly
by eutectic on Thursday December 15, 2016 @08:05AM
(#13184287)
Presumably there is a pass to turn f(recur(x), y) into recur(f(y, acc), x) and then tail-call optimization can be applied. This works for any associative f.
I'd like to know how the recursion to iteration step was done.