[Haskell] Re: sizeFM type

Robert Will robertw at stud.tu-ilmenau.de
Mon Apr 26 20:47:40 EDT 2004


> On Sun, Apr 25, 2004 at 03:18:20PM -0400, S. Alexander Jacobson wrote:
> >
> >[..]
> > 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.

I understand the Int type to be as large as pointers on each kind of
hardware.  So one cannot possible have any data structure whose size
doesn't fit in an 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.

Well, Int is built-in to any hardware, while Integer isn't.  Since
Int/Integer is one of the most used data types in almost any program, the
difference would be _very_ big.

Robert


More information about the Haskell mailing list