[Haskell-cafe] Mysterious factorial
daniel.is.fischer at web.de
Wed Dec 30 11:40:37 EST 2009
Am Mittwoch 30 Dezember 2009 17:28:37 schrieb Roel van Dijk:
> I can't offer much insight but could the answer lie in the Integer
> type? I suspect that with a sufficiently large fixed Int type (2^14
> bits?) the performance of the two functions would be almost equal.
For fact (10^6), we'd need rather 2^24 bits for the performance to be comparable.
Imagine such an ALU :D
> Could it be that the second function delays the multiplication of
> large numbers as long as possible? The divide-and-conquer approach?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe