[Haskell-cafe] measure a function in ghci

Ketil Malde ketil at malde.org
Thu Jun 4 03:14:58 EDT 2009

Jason Dagit <dagit at codersbase.com> writes:

> Be wary of timing things in GHCi.  By default there are no optimizations in
> ghci so you could find that one implementation is much worse than the other
> but the situation might be completely different when optimizations are
> enabled.  I'm pretty sure if you start ghci with the -O flag that it will
> use optimizations.

...or if you compile your module first (ghc -c), I believe GHCi will use the
compiled code.

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list