Haskell, OCaml Performance
- Haskell: Sooner, Faster, Quicker (notably, Faster)
- OCaml: Performance and Profiling
One important difference between the two languages is that, while Haskell also permits the use of strict evaluation and unboxed types, it generally does not do so by default. OCaml also benefits from a Fortran-like emphasis on math performance.
Of course, as both articles more or less point out, if you’re using an O(nm) algorithm, no amount of unboxing, strictness, or compiler optimization will help you, regardless of language. Profile first and try to keep algorithmic complexity under control.