To profile our program we have to compile it using ghc -prof -auto-all --make main.hs, this adds profiling code to our program.
To run our program with profiling enabled, we start it with ./main +RTS -p -RTS [main args]. This generates a file (main.prof) containing the profiling results.
No comments:
Post a Comment