Personal tools   From HaskellWiki  < Performance Revision as of
15:22, 10 January 2006 by Simonmar (Talk | contribs)  Jump to:
navigation, search  Please report any overly-slow GHC-compiled
programs. Since GHC doesn't have any credible competition in the
performance department these days it's hard to say what overly-
slow means, so just use your judgement! Of course, if a GHC
compiled program runs slower than the same program compiled by
another compiler, then it's definitely a bug.  1 Use
Optimisation  Optimise, using -O or -O2: this is the most basic
way to make your program go faster. Compilation time will be
slower, especially with -O2.  At present, -O2 is nearly
indistinguishable from -O.  GHCi cannot optimise interpreted
code, so when using GHCi, compile critical modules using -O or
-O2, then load them into GHCi.  2 Measuring Performance  The
first thing to do is measure the performance of your program,
and find out whether all the time is being spent in the garbage
collector or not. Run your program wit