def ack(m, n) if (m == 0) n + 1 elsif (n == 0) ack(m - 1, 1) else ack(m - 1, ack(m, n - 1)) end end Bench.run [7, 9] do |n| ack(3, n) end