[Haskell-cafe] Program with profiling runs faster than without

Grigory Sarnitskiy sargrigory at ya.ru
Tue Jul 14 04:37:19 EDT 2009


Hello! I can't understand why the following happens.

ghc --make -fforce-recomp -O2 -fexcess-precision -fvia-C -optc-O2 Run.lhs -o Run -prof -auto-all
and
time ./Run TestSim

seems to be much faster (I got ~4 times faster indeed) than just

ghc --make -fforce-recomp -O2 -fexcess-precision -fvia-C -optc-O2 Run.lhs -o Run
and
time ./Run TestSim

with ghc 6.8.2 on pentium 4 2.4 GHz under Ubuntu

I was on my way to optimize the program when I've discovered this. The program is rather complicated and badly optimized but still I think it is quite strange to the profiled version to run faster. All necessary files I send with this letter (Tann.7z).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Tann.7z
Type: application/x-7z-compressed
Size: 54150 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090714/f027695d/Tann-0001.bin


More information about the Haskell-Cafe mailing list