On Sun, Sep 19, 2010 at 20:16, Conrad Parker <con...@metadecks.org> wrote: > Anyway, good work. Does this have any overlap with > data-binary-ieee754? There was some recent discussion here about the > encoding speed in that package.
I should probably make it more clear that data-binary-ieee754 is for special use cases; for most people, using something like this will be much faster since it doesn't have to poke around the individual bits: putFloat32be :: Float -> Put putFloat32be = putWord32be . unsafeCoerce I needed "real" IEEE754 binary support for round-trip parsing, where (for example) maintaining the particular bit pattern of a NaN is important. For 99% of people, the "unsafe" method will work fine. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe