returning to cost of Integer

John Meacham john at repetae.net
Wed Aug 2 17:25:45 EDT 2006


On Wed, Aug 02, 2006 at 01:06:48PM +0100, Simon Marlow wrote:
> I like this idea - I remember discussing just such a scheme with John 
> Launchbury recently.  It has a lot in common with the semi-tagging scheme 
> we've wanted to implement for some time, where the idea is that you use the 
> low bits of a pointer to store the tag of the constructor it points to, if 
> evaluated.  If the contents of the constructor itself can be packed into 
> the other 30 bits, then there's no need for a pointer at all.  For 
> enumerated types, you can use all 31 bits for the tag, since only 1 bit is 
> required to indicate evaluated/unevaluated and no pointer is needed.

Not just for enumerated types, but for any constructors that don't have
any components (independent of other constructors). as in 'Nothing' from
Maybe could be represented this way.

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Glasgow-haskell-users mailing list