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 customization
strategies for function representations. We develop a cost model to
interpret dynamic counts of operations required for each strategy.
One of our results is data showing that, in this cost model,
compiling with a function representation strategy that
makes customization decisions based on the presence or absence of free
variables of a function gives a 26% improvement over a uniform closure
representation. We also present data on the relative effectiveness
of various representation pollution removal strategies. We find that
for the types of representation pollution detected by our compiler,
pollution removal rarely provides any additional benefit for the
representation strategies and benchmarks considered.