[Haskell-cafe] cereal vs. binary

Alexey Khudyakov alexey.skladnoy at gmail.com
Sat Jul 3 14:54:57 EDT 2010

On Sat, Jul 3, 2010 at 8:57 PM, braver <deliverable at gmail.com> wrote:
> I dump results of a computation as a Data.Trie of [(Int,Float)].  It
> contains about 5 million entries, with the lists of 35 or less pairs
> each.  It takes 8 minutes to load with Data.Binary and lookup a single
> key.  What can take so long?  If I change from compressed to
> uncompressed (and then decode), it's the same time...  It's not IO,
> CPU is loaded 100%.
> I'm now thinking of using cereal.  Given I have Data.Binary in place,
> what needs to be changed to work with cereal?  Is it binary-
> compatible?  How can one construct a cereal instance for Data.Trie?
I suspect Float instance is problem. Try to to the same with (Int,Int) pairs.

More information about the Haskell-Cafe mailing list