[Haskell-cafe] compressed pointers?

John Meacham john at repetae.net
Thu Apr 17 20:25:20 EDT 2008


jhc packs data into pointers when possible. so for instance

data Foo = Foo !Word16 !Word32

gets encoded as

    -------------------------------
    | 16 bits | 32 bits | ... | 10|
    -------------------------------

This particularly helps strings, where the character can often be
encoded in the space of the pointer itself. (even on 32 bit
architecturs, as Char is only 24 bits in jhc)

        John

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


More information about the Haskell-Cafe mailing list