|
|
|
|
|
by monopede
5177 days ago
|
|
That depends on the kind of scientific computing you want to do. Haskell has the repa library [1] which is very nice for working with (multi-dimensional) arrays at a high level. Performance is decent (I don't know if they have a BLAS/LAPACK binding). Overall, the main advantage of Haskell is its runtime system and its great support for concurrency. The downside is, it does not have OpenMP and the MPI bindings don't look very nice to use (I don't know how OCaml or SML fare in this area). There are OpenCL bindings, but I've never used them. Data parallel Haskell is still under heavy development, so that's probably going to take a few years to become production-ready. OCaml's advantage is that C-like algorithms are easier to transcribe and use (no monads). OCaml's main disadvantage is that its runtime doesn't support multicore well (or even at all?). If you want that you can use F#, though. I don't know anything about the current state of SML implementations. [1]: http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Repa_T... |
|
That said there is this patched up version (funded by a one off summer of code by Jane street, I think)
http://www.algo-prog.info/ocmc/
that gives an API for using threads. I am fairly new to OCaML so will not be able to provide details. Another language that I am looking at is Felix
http://felix-lang.org:8080/ (Note the port, its not the one that the search engines will give you).
I am ok with OCaML not giving its users a threading API but a runtime that executes many of its higher-order functions in parallel would be really nice. Well, higher-order functions and the other parallelism exposed by the functional semantics, with some helpful directives from the user of course.