On 28/01/07, Donald Bruce Stewart <[EMAIL PROTECTED]> wrote:

I've added raw primitives for:

    {put,get}Wordhost
    {put,get}Word16host
    {put,get}Word32host
    {put,get}Word64host

which do unaligned, host-sized, host-endian packing of data.

Writing is some 15% faster for Words, a bit less for reading (which is a
bit unoptimised at the moment), and a bit less for other types. Needless
to say, data serialised this way is only portable to the same
architecture.

If the data header stores the alignment/size/endianness, then there's
no reason for the data to be unportable. The normal get* instances
(not get*host) could suffice for reading.

Conrad.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to