
21 Nov
2007
21 Nov
'07
9:03 a.m.
Ketil Malde
Gracjan Polak
writes: let entries = IntMap.fromList (map (\(a,b,c) -> (a,c)) (concat p))
Gut reaction: Map is lazy in its values (but probably not the key, which are checked for order), so you should force the 'c' before inserting it in the map. (There's probably a strict fromList or IntMap somewhere?)
I tried both Map and IntMap and there was no difference in memory total usage or usage pattern. Seems I'm already strict enough. Values are left lazy till the point where they are forced, and that is at write-out in my current excersise. I'd want to leave them lazy as in more involved transformation not all of them will be needed. -- Gracjan