Functioning without closure: Type-safe customized function representations for standard ML

Allyn Dimock, Ian Westmacott, Robert Muller, Franklyn Turbak, J. B. Wells

Research output: Contribution to journalArticle

1 Citation (Scopus)

Abstract

The CIL compiler for core Standard ML compiles whole ML programs using a novel typed intermediate language that supports the generation of type-safe customized data representations. In this paper, we present empirical data comparing the relative efficacy of several different flow-based customization strategies for function representations. We develop a cost model to interpret dynamic counts of operations required for each strategy. In this cost model, customizing the representation of closed functions gives a 12-17% improvement on average over uniform closure representations, depending on the layout of the closure. We also present data on the relative effectiveness of various strategies for reducing representation pollution, i.e., situations where flow constraints require the representation of a value to be less efficient than it would be in ideal circumstances. For the benchmarks tested and the types of representation pollution detected by our compiler, the pollution removal strategies we consider often cost more in overhead than they gain via enabled customizations. Notable exceptions are selective defunctionalization, a function representation strategy that often achieves significant customization benefits via aggressive pollution removal, and a simple form of flow-directed inlining, in which pollution removal allows multiple functions to be inlined at the same call site. Copyright 2001 ACM.

Original languageEnglish
Pages (from-to)14-25
Number of pages12
JournalACM SIGPLAN Notices
Volume36
Issue number10
Publication statusPublished - Oct 2001

Fingerprint Dive into the research topics of 'Functioning without closure: Type-safe customized function representations for standard ML'. Together they form a unique fingerprint.

  • Cite this