
10 Jun
2009
10 Jun
'09
9:38 a.m.
Diego Souza
I'd like to make it run faster, if possible. What should I do to identify the bottlenecks and once I find them, a few guidelines to actually fix them.
The usual approach is to compile with profiling (ghc -prof -auto-all, don't forget to optimize!), and run with time profiling enabled (./my-program -my-options +RTS -p). You can then examine the resulting profiling output (my-program.prof) to identify hotspots, and try to improve them. -k -- If I haven't seen further, it is by standing in the footprints of giants