GHC profiling

Referenced from: GHC User’s guide

Steps

  1. Recompile program with -prof. (Automate with -fprof-auto).

    Uses cost centres to determine time / space costs.

  2. Generate profile prog.prof, by adding +RTS -p while executing binary.

  3. Examine profiled info, use to optimize program.