Code compiled WITHOUT profiling many times slower than compiled WITH profiling on
I have a program which runs extremely slow when I compile it with profiling disabled. It only becomes usable when compiled with profiling options on (-prof -auto-all).
I reproduced it with GHC 6.10, 6.12 and 6.13.
The source is attached.
I compiled and ran like this:
ghc-6.13.20091027 --make -O2 runST.hs -fforce-recomp
time ./runST > /dev/null
real 5m9.670s
user 5m7.627s
sys 0m0.468s
ghc-6.13.20091027 --make -O2 runST.hs -fforce-recomp -prof -auto-all
real 0m39.544s
user 0m39.050s
sys 0m0.148s
In the meantime, is there is a workaround other than compiling with profiling options on? I would prefer to modify the source rather than ask users to install profiling libraries and mess with compiler options.
Best,
-- Grzegorz Chrupala
Trac metadata
Trac field | Value |
---|---|
Version | 6.13 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |