Identifying Profitable Specialization in Object-Oriented Languages
Craig Chambers, and
The performance of object-oriented languages can be greatly improved
if methods can be specialized for particular classes of
arguments. Such specialization can provide the compiler with enough
class information about the receivers of messages within the
specialized routine to enable these messages to be statically-bound to
their target methods and subsequently inlined. We present an algorithm
for automatically determining which methods are most profitable to
specialize for which argument classes. This algorithm improves on
previous automatic techniques by avoiding the twin problems of over-
and underspecialization and by being suitable for specializing
programs that use multi-methods.
Workshop on Partial Evaluation & Semantics-based Program Manipulation, Orlando, Florida, June, 1994.
Also published as UW-CS TR 94-02-05.
An updated version
of this paper appeared in PLDI'95.
To get the PostScript file, click