[Haskell] Performance impact of GHC profiling?

Ben Gamari ben at smart-cactus.org
Thu Dec 28 18:19:33 UTC 2017


"Howard B. Golden via Haskell" <haskell at 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell/attachments/20171228/54cca038/attachment.sig>


More information about the Haskell mailing list