[MLton] Packing and IntInf
Matthew Fluet
fluet@cs.cornell.edu
Wed, 19 May 2004 08:31:36 -0400 (EDT)
> >From the user-guide:
> MLton represents an arbitrary precision integer either as an
> unboxed 32 bit word with the bottom bit set to 1 and the top 31
> bits representing a small integer in [-2^30, 2^30), or as a pointer
> to a vector of words where the first word indicates the sign and
> the rest are the limbs of GNUmp big integer.
>
> Is this special representation necceary with the new packer? Could you
> instead use the natural representation of:
> datatype t = Small of Int31.int | Big of bool * word vector
> and have the packer decide on a similar representation ?
The representation packer should do the "right thing" with the natural
representation; see
http://www.mlton.org/pipermail/mlton/2004-April/015766.html
But, we haven't modified the Basis Library code to take advantage of this,
although it ought not to be that painful a process.