[Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

John Van Enk vanenkj at gmail.com
Mon Jun 14 10:39:16 EDT 2010


Would it be possible to use an IntMap instead of your OrdMap? Perhaps zip
your users with [0..] and key off the integer?

As a side note, I threw this package onto Hackage a while ago and may suit
your needs if you decide to move to something like IntMap:
http://hackage.haskell.org/package/EnumMap

It does have a performance hit over an IntMap, but I'm not entirely sure how
large it is.

/jve

On Mon, Jun 14, 2010 at 10:27 AM, braver <deliverable at gmail.com> wrote:

> I've supplied a profile report there.  Since I load the graphs in
> memory and then walk them a lot, the time seems expected.  It
> allocates a lot, though.  The main graph type is
>
>
> type Graph = M.Map User AdjList
> type AdjList = M.Map Day Reps
> type User = B.ByteString
> type Day = Int
> type Reps = M.Map User Int
>
> and I walk it with M.foldWithKey.  Folks said it's not strict enough,
> hence I tried to seq the step function, but to no avail so far.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100614/3e412b88/attachment.html


More information about the Haskell-Cafe mailing list