Object-oriented programming languages provide many software engineering ben
efits, but these often come at, a performance cost. Object-oriented program
s make extensive use of method invocations and pointer dereferences, both o
f which are potentially costly on modern machines. We show how to use types
to produce effective, yet simple, techniques that reduce the costs of thes
e features in Modula-3, a statically typed, object-oriented language. Our c
ompiler performs type-based alias analysis to disambiguate memory reference
s. It uses the results of the type-based alias analysis to eliminate redund
ant memory references and to replace monomorphic method invocation sites wi
th direct calls. Using Limit, static, and running time evaluation, we demon
strate that these techniques are effective, and sometimes perfect for a set
of Medula-3 benchmarks.