Serialization of floating point numbers with
binaryis fantastically slow and incorrect if you’re usingNaNs, seeI recently spent half a day debugging performance problems because of this, and since backwards compatibility with older formats is required, this problem is probably not going to be solved.
We decided to switch to
cerealfor this reason. With some patches cereal was 30x faster for the data we were serializing (scientific computing, mostlyDoubles packed in nested records containing vectors).The size of the serialized data is also roughly 3 times smaller – with
binaryaDoubletakes at least 25 bytes of space instead of 8. WithFloatit’s even worse, 25 bytes instead of 8.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe