Using types to analyze and optimize object-oriented programs

被引:16
作者
Diwan, A [1 ]
McKinley, KS
Moss, JEB
机构
[1] Univ Colorado, Dept Comp Sci, Boulder, CO 80309 USA
[2] Univ Massachusetts, Dept Comp Sci, Amherst, MA 01003 USA
来源
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS | 2001年 / 23卷 / 01期
关键词
algorithms; languages; performance; measurement; alias analysis; polymorphism; classes and objects; object orientation; method invocation; redundancy elimination;
D O I
10.1145/383721.383732
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Object-oriented programming languages provide many software engineering benefits, but these often come at, a performance cost. Object-oriented programs make extensive use of method invocations and pointer dereferences, both of which are potentially costly on modern machines. We show how to use types to produce effective, yet simple, techniques that reduce the costs of these features in Modula-3, a statically typed, object-oriented language. Our compiler performs type-based alias analysis to disambiguate memory references. It uses the results of the type-based alias analysis to eliminate redundant memory references and to replace monomorphic method invocation sites with direct calls. Using Limit, static, and running time evaluation, we demonstrate that these techniques are effective, and sometimes perfect for a set of Medula-3 benchmarks.
引用
收藏
页码:30 / 72
页数:43
相关论文
共 72 条
[1]  
AGESEN O, 1995, P 10 ANN C OBJ OR PR, P91
[2]  
Aho Alfred V., 1986, ADDISON WESLEY SERIE
[3]  
AIGNER G, 1996, P 10 EUR C OBJ OR PR, P142
[4]  
ANDERSON LO, 1994, THESIS DIKU
[5]  
[Anonymous], 1995, COMPUTER ARCHITECTUR
[6]  
BANNING J, 1979, 6TH ANN ACM S PRINC, P29
[7]  
BATES RM, 1994, COMMUNICATION
[8]  
BURKE M, 1994, 19546 IBM TJ WATS RE
[9]  
CALDER B, 1995, 28 INT S MICR NOV, P199
[10]  
CALDER B, 1994, CUCS69894 U COL