First some background: the unit of work for my code is a “case” - an Excel workbook and a series of mutations of the values in it, and a JSON file that describes the authoritative behavior of how Windows Excel responds to those series of mutations and calculations. Cases can cover a wide or narrow range of behavior - some are like integration tests, which evaluate large sets of functionality in concert, others are closer in construction to unit tests, evaluating all of the nuances of function behavior. When a case is evaluated, it results in many code-generation and compilation steps, each of which can have independent performance bottlenecks.