[EMAIL PROTECTED] (Marcin 'Qrczak' Kowalczyk) writes:

> I have to care how fast my programs run. I like writing in Haskell
> very much, it's my favorite general-purpose language, but one of the
> biggest weak points of Haskell for me is poor efficiency (at least
> with ghc, I don't know how fast are other compilers). I wonder whether
> this is the issue of Haskell itself or the compilers, I wonder if I
> can expect things to go better in future.

I don't know what the future holds but, at least with GHC,
you already have a range of options, to try to go faster.

* You can profile your code and write better "standard"
  Haskell;

* You can drop down to non-standard Haskell, and express
  your code with (e.g.) unboxed values, bytePrimArray#s, --
  i.e. direct access to the machinery that GHC's libraries
  use;

* You can code selected hot spots in C/whatever, and call
  out from Haskell to do those; if you do enough of this,
  you end up with the non-Haskell program you would've had
  to write anyway :-)

* You can give your code to the GHC people for benchmarking
  purposes; be sure to mention, "By the way, this code runs
  N times faster when compiled by HBC" -- it works wonders.

I think it is Very Cool that users have it within their
power to claw back arbitrary "performance loss", if they
want/need to.

Will


Reply via email to