[Haskell-cafe] Haskell performance in heavy numerical computations

Greg Fitzgerald garious at gmail.com
Thu Jul 6 20:40:10 EDT 2006


I have tried.  Using just normal lists, I found it difficult to avoid huge
space leaks, but once things are working, the end result is easy to reason
about.

I'm considering giving it another try using Stream Processors or some form
of Arrows instead of lists.  I think this strategy might allow me to do
several transformations of the same input list in pseudo-parallel, which
would allow the GC to collect old data as soon as its not needed by the
computation that decides when to buy and sell.  The Stream Processor library
I was looking at uses Continuation Passing Style, which I don't know too
much about, and I'm not sure Arrows will work out.

Generalizing the problem, how does one express: "given multiple
transformations of an infinite numeric list, perform some IO at the first
instance some predicate is met"?

I feel that Arrows might somehow trivially allow me to compute on huge lists
without leaking, but don't understand them well enough to apply them.

If one could write an arrow that applies the transformations to the input
list in parallel, then I'd think you could solve the above example something
like this:
(f &&& g) >>> dropWhile (\(x,y) -> x > 0 && y > 0) >>> performSomeIO

Maybe <+> is the arrow operator I'm looking for, not &&&, but to be honest,
the documentation for Arrows blows my mind.  I think a few examples would go
a long way.

Thanks,
Greg


On 7/6/06, Joel Reymont <joelr1 at gmail.com> wrote:
>
> Is anyone using Haskell for heavy numerical computations? Could you
> share your experience?
>
> My app will be mostly about running computations over huge amounts of
> stock data (time series)  so I'm thinking I might be better of with
> OCaml.
>
>         Thanks, Joel
>
> --
> http://wagerlabs.com/
>
>
>
>
>
> _______________________________________________
> 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/20060706/6d1ed114/attachment-0001.htm


More information about the Haskell-Cafe mailing list