sizeFM type

David Roundy droundy at
Sun Apr 25 17:12:25 EDT 2004

On Sun, Apr 25, 2004 at 03:20:42PM -0400, S. Alexander Jacobson wrote:
>   QUESTION: "I read in a newspaper that in l981 you
>   said '640K of memory should be enough for
>   anybody.' What did you mean when you said this?"
>   ANSWER: "I've said some stupid things and some
>   wrong things, but not that. No one involved in
>   computers would ever say that a certain amount of
>   memory is enough for all time."
> Dell's Poweredge servers address up to 32GB of
> memory today!  There are already 5.7 billion
> people on the planet (>2^31) and 741 million phone
> lines.  In my mind, there is NO QUESTION that 2^31
> keys is a reasonable size for a FiniteMap or will
> be in the very very near future.

On the other hand, since they are still 32 bit computers, any given
application can still only access 4G of memory.  This issue will only be a
problem on 64 bit platforms which have a 32 bit Int.

> Moreover, it is not clear that the CPU/memory
> overhead of returning Integer rather than Int for
> sizeFM is sufficiently high to be worth bothering
> the programmer about.

I'd say that rather than returning an Integer, we'd be better off just
using a 64 bit Int on 64 platforms.
David Roundy

More information about the Glasgow-haskell-users mailing list