~1k memory per elem for FiniteMap!!!?

25 Jan
2005
25 Jan
'05
5:41 p.m.
Is it possible/reasonable that Data.FiniteMap takes around 1k per element? I just profiled this code: import Data.FiniteMap zipped =zip [1..] [1..50000] addFMItem (index,item) fm = (addToFM $! fm) item index produce = foldr addFMItem emptyFM zipped fm = take 1 $ keysFM produce main = print $ fm And it apparently consumes more than 45MB of heap and won't run unless I give it at least 3M of stack space. I assume I doing something wrong here, but have no idea what it is. -Alex- ______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
7467
Age (days ago)
7467
Last active (days ago)
0 comments
1 participants
participants (1)
-
S. Alexander Jacobson