[Haskell-cafe] bizarre memory usage with data.binary
Stefan O'Rear
stefanor at cox.net
Tue Oct 2 19:25:42 EDT 2007
On Wed, Oct 03, 2007 at 01:22:25AM +0200, Roel van Dijk wrote:
> Does it terminate?
>
> Looks like you are summing all the natural numbers. On a turing
> machine it should run forever, on a real computer it should run out
> of memory. Unless I am missing something obvious :-)
There are only about 4 billion distinct values of type Int, 2 billion of
which are positive. Integer is required for bigger values
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20071002/73e4a66a/attachment.bin
More information about the Haskell-Cafe
mailing list