[Haskell-cafe] Program with profiling runs faster than without
Grigory Sarnitskiy
sargrigory at ya.ru
Tue Jul 14 06:09:50 EDT 2009
14.07.09, 12:37, "Grigory Sarnitskiy" <sargrigory at ya.ru>:
> 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).
Well, I've tested the code with ghc 6.10.3 under Windows --- the result is quite the same, however with the native binary compilier (not via C) the redult is even more drastic. I'm really interested how to obtain the same speed withput profiling compilation.
More information about the Haskell-Cafe
mailing list