[Haskell-cafe] Re: bizarre memory usage with data.binary

Anatoly Yakovenko aeyakovenko at gmail.com
Tue Oct 2 20:51:47 EDT 2007


> If its specifically the list instance, where we currently trade laziness
> for efficiency of encoding (which may or may not be the right thing),
> I'd suggest a fully lazy encoding instance?

Its not really a list, its more of a tree that has shared nodes, so
something like this:

        A
     /     \
    B      C
      \   /
       D
     /   \
    E    F

I suspect that maybe after encode/decode i end up with something like

        A
     /     \
    B      C
   /          \
  D           D
 /   \        /   \
E    F    E     F


More information about the Haskell-Cafe mailing list