[Haskell-cafe] Haskell performance in heavy numerical computations
brandonm at yahoo-inc.com
Fri Jul 7 13:06:14 EDT 2006
Joel Reymont 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.
If you are really serious about numerical throughput, you probably
should be looking at vector instructions, CPU cache sizes, and
parallelising your algorithms, not choosing between high-level languages.
Hopefully it's enough to do that sort of thing for a few important
primitives, and then you can write the rest of the program in whatever
langauge you like.
It sounds like MonetDB might be related to your problem. This database
is designed for ad-hoc analytical queries which touch most of the rows
(but hopefully only a few of the columns) of a database. The design of
the system has a lot of interesting analysis about the performance
characteristics of modern hardware.
The first sections of the Boncz thesis provide an overview which will
hopefully tell you rather this stuff applies at all. The only paper with
"X100" in the title is an overview of what's been happening more lately.
* Optimizing Combinator Libraries
If you are trying to build a nice and efficient library in Haskell over
a few fast primitives, the ByteString library could be a good example.
In particular, the use of rewrite rules for loop fusion might help in
your case as well.
If you are trying to build a combinator library in Haskell over a few
efficient primitives, you might like the use of rewrite rules in
Data.ByteString to implement some kinds of loop fusion.
I liked the slides
Perhaps idea from this paper could help if you are doing more
Dynamic Optimization for Functional Reactive Programming using
Generalized Algebraic Data Types
More information about the Haskell-Cafe