2010/1/5 Mark Lentczner <markl@glyphic.com>
There you can find the code that tests storing 16 bytes in various ways:
> data InWords = WO !Word32 !Word32 !Word32 !Word32
> deriving (Eq, Ord)
>
> data InList = LI [Word8] deriving (Eq, Ord)
> data InByteString = BS B.ByteString deriving (Eq, Ord)
> data InArray = AR (A.Array Int Word8) deriving (Eq, Ord)
> data InUArray = UA (U.UArray Int Word8) deriving (Eq, Ord)
> data InVector = VE (V.UArr Word8) deriving (Eq)
You've got an extra level of indirection there due to the use of data instead of newtype, so you're paying an additional boxing penalty for everything except your first case. Are you compiling with -funbox-strict-fields?