Strange compilation behavior
daniel.is.fischer at web.de
Sun Dec 9 18:43:57 EST 2007
Am Montag, 10. Dezember 2007 00:29 schrieb Chad Scherrer:
> I'm using ghc 6.6.1 under Ubuntu Gutsy on a Pentium 4 machine, and I
> was working to get some code running in an acceptable time. I was
> surprised to find that turning on profiling switches made the code run
> over 40x faster!
> Here's the first run, using ghc --make -O2:
> 88.03user 0.08system 1:28.16elapsed 99%CPU (0avgtext+0avgdata
> 0maxresident)k 0inputs+0outputs (0major+13517minor)pagefaults 0swaps
> And with ghc --make -O2 -prof -auto-all:
> 2.33user 0.07system 0:02.41elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (0major+17712minor)pagefaults 0swaps
> Otherwise everything is the same! Is this something anyone else has
> run into? I'm not sure if it might have been fixed in 6.8.1, but
> something funny is going on here.
Might be ticket #1934, though -O2 -prof -auto-all resulted in an incorrect
programme for me, which ran in 0.00s. Try also ghc --make -O -prof -auto-all
and ghc --make -O2 -prof -auto
For me, both these combinations produced correct programmes which took
reasonable time. If it's the same for you, it probably is the same bug, which
did not show with 6.8.1.
More information about the Glasgow-haskell-users