[Haskell-cafe] Iteratees again (Was: How on Earth Do You Reason about Space?)

wren ng thornton wren at freegeek.org
Fri Jun 3 07:01:20 CEST 2011

On 6/2/11 8:59 AM, Aleksandar Dimitrov wrote:
> Hi Ketil,
>> By the way, what is the advantage of using iteratees here?  For my
>> testing, I just used:
> My initial move to iteratees was more a clutch call I made when I was still
> using bytestring-trie, and was having immense memory consumption problems.

bytestring-trie also (intentionally) uses ByteString slicing in order to 
minimize copying. It does so semi-intelligently--- ensuring that of the 
two sharing options it chooses the one with a shorter "spur". About half 
the time that spur will be used by continuing down the trie, but you can 
still end up with unwanted overhead especially if you're intermittently 
removing keys from the trie.

I've been meaning to add functions to remove spurs (because sometimes 
the memory is more important than the running time) and meaning to add 
various other upgrades. I've just been too busy with other code for the 
last year or so.

Live well,

More information about the Haskell-Cafe mailing list