Performance impact of GHC profiling?
Hi, I have wondered what the approximate execution (not compilation) performance impact (time, space) of compiling all Haskell programs with -prof and -fprof- auto compared to regular compilations. For this purpose, I assume that I would run the executables WITHOUT +RTS -p or any other profiling option. In other words, I would make -prof and -fprof-auto the compilation defaults, but only use profiling runtime occasionally. Does anyone have any data or benchmarks about this? Thanks. Regards, Howard
"Howard B. Golden via Haskell" <haskell@haskell.org> writes:
Hi,
I have wondered what the approximate execution (not compilation) performance impact (time, space) of compiling all Haskell programs with -prof and -fprof- auto compared to regular compilations. For this purpose, I assume that I would run the executables WITHOUT +RTS -p or any other profiling option. In other words, I would make -prof and -fprof-auto the compilation defaults, but only use profiling runtime occasionally.
Does anyone have any data or benchmarks about this? Thanks.
While I don't have any hard data, I can say that the severity of the effect really depends upon the nature of the code and how many cost centers you insert (either manually or automatically with, say, -fprof-auto). Cost centers can act as optimization barriers which can sometimes prevent deforestation. When this happens the effect can be quite significant. With no cost centers at all I would expect that the effect of the profiled runtime is quite small (perhaps less than a few percent?) Cheers, - Ben
participants (2)
-
Ben Gamari -
Howard B. Golden