Identifying Profitable Specialization in Object-Oriented Languages

Authors: Jeffrey Dean, Craig Chambers, and David Grove

Citation: ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation June 25, 1994, Orlando, FL, USA.

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.

PDF