
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

On Tue, Nov 22, 2005 at 11:07:07AM +0100, Dusan Kolar wrote:
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.
I think the real source of your problem is that GHCi will load a compiled .o file if it's up to date wrt. the source files. When you load modules, watch the messages printed by GHCi. "Skipping" means loading the .o file, "Compiling" means that the module will be compiled and interpreted by GHCi. Anyway, it's strange that you are experiencing crashes. IIRC, there were problems if you mixed modules compiled with different levels of optimisation in the same program, but I am not sure it still happens. Best regards Tomasz
participants (2)
-
Dusan Kolar
-
Tomasz Zielonka