I am running an application "as a script" with stack runghc
. Naturally, it runs slower that way than when compiled and run with stack exec
.
I would like to compare the hotspots of the application as run with "runghc" relative to the compiled version.
I was able to compile my application with profiling enabled via stack build --profile
, then generate a flame graph as described here.
Is there any set of compilation flags that could be used to generate a profile-able binary that is identical (edit: in terms of performance) to that executed by runghc
?