Optimization by compile time garbage collection is onepossible weapon in the functional language implementer's armoury forcombatting the excessive memory allocation usually exhibited by functionalprograms. It is an interesting idea, but the practical question of whetherit yields benefits in practice has still not been answered convincinglyone way or the other.In this short paper we present a mathematical model of the performanceof straightforward versions of mark-scan and copying garbage collectorswith programs optimized for explicit deallocation. A mark-scan heapmanager has a free list, whereas a copying heap manager does not ---herein lies the dilemma, since a copying garbage collector is usuallyconsidered to be faster than a mark-scan, but it cannot take advantageof this important optimization.For tractability we consider only heaps with fixed cells.The results reported show that the garbage collection scheme of choicedepends quite strongly on the heap occupancy ratio: the proportion ofthe total heap occupied by accessible data structures averaged over theexecution of the program. We do not know what typical heap occupancyratios are, and so are unable to make specific recommendations, butthe results may be of use in tailoring applications and heap managementschemes, or in controlling schemes where the heap size varies dynamically.An important result arising from the work reported here is that whenoptimizing for explicit deallocation, a very large proportion of cellreleases must be optimized before very much performance benefit isobtained.
CITATION STYLE
Jones, S. B., & Tyas, A. S. (1994). The Implementer’s Dilemma: A Mathematical Model of Compile Time Garbage Collection (pp. 138–144). https://doi.org/10.1007/978-1-4471-3236-3_11
Mendeley helps you to discover research relevant for your work.