Adding binary to the Haskell Platform

Malcolm Wallace malcolm.wallace at
Wed Aug 5 03:44:16 EDT 2009

> Let's discuss, then have the steering committee recommend yay/nay.

We should have _some_ kind of binary library in the Platform, but I  
don't know whether the proposed library is the right one.

In a recent application, I found Data.Binary very slow, both to encode  
and to decode data.  Decoding had stack-overflows, and when I  
increased the stack, it took about 20mins to read in an 8Mb file.   
When I then turned on optimisation with -O, the performance improved  
considerably (down to ~30secs to read the same file).  This was using  
the standard instances of Binary for data structures like Data.Map.   
30secs was still too slow, so we ended up needing to write our own  
improved instance for Data.Map.  (Timings were similar with both  
ghc-6.8.3 and ghc-6.10.3.)


More information about the Libraries mailing list