In the previous chapter, we got programmed concurrent applications and used the related powerful features of GHC. Next we concentrate on tuning GHC and its Runtime System. For the best performance, it's necessary to tune the compiler and Runtime System according to the application's specific needs. For instance, heavy number crunching benefits greatly from a different compilation path using LLVM, at the expense of longer compilation times and portability. There are lots of useful options, tricks, and tweaks available in GHC that we will look at in this chapter.
This chapter attempts to highlight the most important flags and options in GHC and RTS. It's not meant to be a substitute for GHC UserGuide, which is much more comprehensive. Instead, we cover options in a systematic and easy-to-follow way, starting with compiler options and proceeding with Runtime System options.
At the end of this chapter, the reader will understand the big...