[Haskell] sizeFM type

Wolfgang Jeltsch wolfgang at jeltsch.net
Tue Apr 27 12:03:15 EDT 2004


Am Dienstag, 27. April 2004 00:55 schrieb Don Groves:
> [...]

> Wolfgang and Remi,
>
> Thanks to you both for the explanation. Yes, the GHC Integer
> type does what I was referring to and clearly anything done at
> runtime will slow execution.
>
> For future reference, if I know an integer will never exceed
> an Int, I should type it that way to optimize speed; but using
> Integer will optimize safety - right?

Right.

If performance is not such a big concern it would also be appropriate to 
always use Integer.  Then you would always be on the safe side.

> Don

Wolfgang



More information about the Haskell mailing list