The accumulation of new language additions, standard library interfaces, and compiler features had led to noticably longer compile times in GHC in recent years. Joachim Breitner’s Gipeda is a great diagnostic tool for analysing particular commits. In our effort to make GHC fast again, we were in need of diagnostic tools to analyze compound compile times across periods spanning from weeks to years.
With the Performance Indicator Tracking Application, Pita, we introduce a diagnostic tool for visualizing changes in GHC’s performance characteristics over the course of development. Based on the same dataset used by Gipeda, Pita offers side-by-side comparisons across time and multiple tests. Using Pita, we are able to quickly identify correlations and patterns that trigger compile time speed bumps, allowing us to narrow down years of development to a small set of regressing commits.
This talk provides an introduction to Pita. Using hands-on examples we show how to chase down speed bumps in past commits. Finally, we discuss the state of our effort in improving GHC’s performance, discussing some of the common themes that we have found in the course of the work and sharing some best practices for GHC contributors to minimize the impact of their changes on compiler performance.
Using Pita we have already reduced compiler allocations by 8% on average across nofib. We are hoping that with further work we will ultimately be able to bring compilation times back to pre-7.6 magnitudes in the coming year. We invite the community to help us realize this goal.