https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92559
--- Comment #5 from Konstantin Kharlamov <Hi-Angel at yandex dot ru> --- (In reply to Konstantin Kharlamov from comment #4) > By the way, FTR: I don't have the code anymore, but initially the problem > came from a real-life algorithm involving lots of state, which looked barely > readable when implemented in iterative way (i.e. as opposed to "recursive", > that is when you use for/while-cycles instead of recursion). The iterative > version was 1.5 times bigger than the recursive one, and has a lot of > additional state-tracking variables; and I think it also has two cycles (as > compared to recursive version that has none at all). Oh, I just remember: the recursive version was also immutable, which also made the code much easier to understand (and I was kinda hoping, easier for the compiler to optimize as well). The iterative version involved lots of mutations. They always do.