<div class="gmail_quote">2010/1/5 Mark Lentczner <span dir="ltr">&lt;<a href="mailto:markl@glyphic.com">markl@glyphic.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
There you can find the code that tests storing 16 bytes in various ways:<br>
<br>&gt; data InWords = WO !Word32 !Word32 !Word32 !Word32<br>
&gt;     deriving (Eq, Ord)<br>
&gt;<br>
&gt; data InList       = LI [Word8]              deriving (Eq, Ord)<br>
&gt; data InByteString = BS B.ByteString         deriving (Eq, Ord)<br>
&gt; data InArray      = AR (A.Array Int Word8)  deriving (Eq, Ord)<br>
&gt; data InUArray     = UA (U.UArray Int Word8) deriving (Eq, Ord)<br>
&gt; data InVector     = VE (V.UArr Word8)       deriving (Eq)</blockquote><div><br></div><div>You&#39;ve got an extra level of indirection there due to the use of data instead of newtype, so you&#39;re paying an additional boxing penalty for everything except your first case. Are you compiling with -funbox-strict-fields?</div>
</div>