andrewcoppin: > The problem seems to boil down to this: The Binary instance for > Double (and Float, by the way) is... well I guess you could argue > it's very portable, but efficient it isn't. As we all know, an > IEEE-754 double-precision floating-point number occupies 64 bits; > 1 sign bit, 11 exponent bits, and 52 mantissa bits (implicitly 53). > I had assumed that the Binary instance for Double would simply write > these bits to disk, requiring approximately 0 computational power, and > exactly 64 bits of disk space. I was wrong. > > Is there any danger that there might be some kind of improvement to the > Double instance in the next version of Data.Binary?
This was discussed last week. A patch was posted implementing more efficient low level double encodings. Google for the thread: "Data.Binary and little endian encoding". Tim _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe