[Haskell-cafe] GHCi always optimizes?

Dusan Kolar kolar at fit.vutbr.cz
Tue Nov 22 05:07:07 EST 2005


Hello all,

  My question is rather strange, maybe, even if simple:
Does ghci always translates with "-O" option set on?

  I've done some measurements on an application
using ghc and ghci.

ghc compiled with no opmitization => program running
real    988m59.260s
user    989m1.325s
sys     0m0.704s

ghc compiled with optimization set on => program running
real    15m54.343s
user    15m54.168s
sys     0m0.172s


ghci alaways:
951.97 secs, 7445117252 bytes (which is 15m51.97sec)

  To be honest, I don't mind ghci optimizes always
but saying it uses the same options as ghc is not
entirely true and, for optimization, it's quite painful
because one searches error where it is not. (/Understand,
I was wondering why program compiled by ghc crashes
and/or evaluates so long while running correctly
and fast in ghci./)


  Dusan



More information about the Haskell-Cafe mailing list