Ackermann very inefficient with Haskell/GHC
NB: The high memory usage issue is a bug in the GHC RTS, where upon stack overflow and allocation of new stacks on the heap it was not checked whether garbage collection is due. It has been already fixed in GHC HEAD. I was able to get much better performance by CPS-converting ack: module Main … Read more