Results 1 - 10
of
13
Optimization of Object-Oriented Programs using Static Class Hierarchy Analysis
, 1995
"... Abstract. Optimizing compilers for object-oriented languages apply static class analysis and other techniques to try to deduce precise information about the possible classes of the receivers of messages; if successful, dynamicallydispatched messages can be replaced with direct procedure calls and po ..."
Abstract
-
Cited by 302 (18 self)
- Add to MetaCart
Abstract. Optimizing compilers for object-oriented languages apply static class analysis and other techniques to try to deduce precise information about the possible classes of the receivers of messages; if successful, dynamicallydispatched messages can be replaced with direct procedure calls and potentially further optimized through inline-expansion. By examining the complete inheritance graph of a program, which we call class hierarchy analysis, the compiler can improve the quality of static class information and thereby improve run-time performance. In this paper we present class hierarchy analysis and describe techniques for implementing this analysis effectively in both statically- and dynamically-typed languages and also in the presence of multi-methods. We also discuss how class hierarchy analysis can be supported in an interactive programming environment and, to some extent, in the presence of separate compilation. Finally, we assess the bottom-line performance improvement due to class hierarchy analysis alone and in combination with two other “competing ” optimizations, profileguided receiver class prediction and method specialization. 1
Reconciling responsiveness with performance in pure object-oriented languages
- ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
, 1996
"... Dynamically-dispatched calls often limit the performance of object-oriented programs since object-oriented programming encourages factoring code into small, reusable units, thereby increasing the frequency of these expensive operations. Frequent calls not only slow down execution with the dispatch o ..."
Abstract
-
Cited by 55 (0 self)
- Add to MetaCart
Dynamically-dispatched calls often limit the performance of object-oriented programs since object-oriented programming encourages factoring code into small, reusable units, thereby increasing the frequency of these expensive operations. Frequent calls not only slow down execution with the dispatch overhead per se, but more importantly they hinder optimization by limiting the range and effectiveness of standard global optimizations. In particular, dynamicallydispatched calls prevent standard interprocedural optimizations that depend on the availability of a static call graph. The SELF implementation described here offers two novel approaches to optimization. Type feedback speculatively inlines dynamically-dispatched calls based on profile information that predicts likely receiver classes. Adaptive optimization reconciles optimizing compilation with interactive performance by incrementally optimizing only the frequently-executed parts of a program. When combined, these two techniques result in a system that can execute programs significantly faster than previous systems while retaining much of the interactiveness of an interpreted system.
Eliminating virtual function calls in C++ programs
, 1996
"... We have designed and implemented an optimizing source-to-source C++ compiler that reduces the frequency of virtual function calls. This technical report describes our preliminary experience with this system. The prototype implementation demonstrates the value of OO-specific optimization of C++. Desp ..."
Abstract
-
Cited by 54 (0 self)
- Add to MetaCart
We have designed and implemented an optimizing source-to-source C++ compiler that reduces the frequency of virtual function calls. This technical report describes our preliminary experience with this system. The prototype implementation demonstrates the value of OO-specific optimization of C++. Despite some limitations of our system, and despite the low frequency of virtual function calls in some of the programs, optimization improves the performance of a suite of two small and six large C++ applications totalling over 90,000 lines of code by a median of 20% over the original programs and reduces the number of virtual function calls by a median factor of 5. For more call-intensive versions of the same programs, performance improved by a median of 40 % and the number of virtual calls dropped by a factor of 21. Our measurements indicate that inlining does not necessarily lead to large increases in code size, and that for most programs, the instruction cache miss ratio does not increase significantly.
Programming as an Experience: The Inspiration for Self
, 1995
"... The Self system attempts to integrate intellectual and non-intellectual aspects of programming to create an overall experience. The language semantics, user interface, and implementation each help create this integrated experience. The language semantics embed the programmer in a uniform world of si ..."
Abstract
-
Cited by 49 (0 self)
- Add to MetaCart
The Self system attempts to integrate intellectual and non-intellectual aspects of programming to create an overall experience. The language semantics, user interface, and implementation each help create this integrated experience. The language semantics embed the programmer in a uniform world of simple objects that can be modified without appealing to definitions of abstractions. In a similar way, the graphical interface puts the user into a uniform world of tangible objects that can be directly manipulated and changed without switching modes. The implementation strives to support the world-of-objects illusion by minimizing perceptible pauses and by providing true source-level semantics without sacrificing performance. As a side benefit, it encourages factoring. Although we see areas that fall short of the vision, on the whole, the language, interface, and implementation conspire so that the Self programmer lives and acts in a consistent and malleable world of objects.
Whole-Program Optimization of Object-Oriented Languages
, 1996
"... This dissertation examines the use of whole-program optimization as a way of improving the performance of object-oriented programming languages. Although object-oriented programming conveys a number of software engineering benefits, heavy application of its trademark feature, dynamic dispatching, i ..."
Abstract
-
Cited by 31 (2 self)
- Add to MetaCart
This dissertation examines the use of whole-program optimization as a way of improving the performance of object-oriented programming languages. Although object-oriented programming conveys a number of software engineering benefits, heavy application of its trademark feature, dynamic dispatching, imposes severe performance penalties when programs are compiled using traditional compilation techniques. Several new techniques that rely on whole-program optimization are described, and these techniques substantially improve the performance of object-oriented programs written in Cecil, Java, C++, and Modula-3. Among the new techniques is class hierarchy analysis, which provides the compiler with knowledge of the class hierarchy of the entire program. This is an especially important optimization, becaus...
Type feedback vs. concrete type inference: A comparison of optimization techniques for object-oriented languages
- In Proceedings of the 1995 ACM Conference on Object Oriented Programming Systems, Languages, and Applications
, 1995
"... Abstract: Two promising optimization techniques for object-oriented languages are type feedback (profilebased receiver class prediction) and concrete type inference (static analysis). We directly compare the two techniques, evaluating their effectiveness on a suite of 23 SELF programs while keeping ..."
Abstract
-
Cited by 29 (2 self)
- Add to MetaCart
Abstract: Two promising optimization techniques for object-oriented languages are type feedback (profilebased receiver class prediction) and concrete type inference (static analysis). We directly compare the two techniques, evaluating their effectiveness on a suite of 23 SELF programs while keeping other factors constant. Our results show that both systems inline over 95 % of all sends and deliver similar overall performance with one exception: SELF’s automatic coercion of machine integers to arbitrary-precision integers upon overflow confounds type inference and slows down arithmeticintensive benchmarks. We discuss several other issues which, given the comparable run-time performance, may influence the
Message dispatch on pipelined processors
- In ECOOP'95 Conference Proceedings
, 1995
"... Abstract. Object-oriented systems must implement message dispatch efficiently in order not to penalize the object-oriented programming style. We characterize the performance of most previously published dispatch techniques for both statically- and dynamically-typed languages with both single and mul ..."
Abstract
-
Cited by 22 (1 self)
- Add to MetaCart
Abstract. Object-oriented systems must implement message dispatch efficiently in order not to penalize the object-oriented programming style. We characterize the performance of most previously published dispatch techniques for both statically- and dynamically-typed languages with both single and multiple inheritance. Hardware organization (in particular, branch latency and superscalar instruction issue) significantly impacts dispatch performance. For example, inline caching may outperform C++-style “vtables ” on deeply pipelined processors even though it executes more instructions per dispatch. We also show that adding support for dynamic typing or multiple inheritance does not significantly impact dispatch speed for most techniques, especially on superscalar machines. Instruction space overhead (calling sequences) can exceed the space cost of data structures (dispatch tables), so that minimal table size may not imply minimal run-time space usage.
GC Points in a Threaded Environment
- SMLI TR-98-70. Sun Microsystems
, 1998
"... : Many garbage-collected systems, including most that involve a stop-the-world phase, restrict GC to socalled GC points. In single-threaded environments, GC points carry no overhead: when a GC must be done, the single thread is already at a GC point. In multi-threaded environments, however, only the ..."
Abstract
-
Cited by 17 (0 self)
- Add to MetaCart
: Many garbage-collected systems, including most that involve a stop-the-world phase, restrict GC to socalled GC points. In single-threaded environments, GC points carry no overhead: when a GC must be done, the single thread is already at a GC point. In multi-threaded environments, however, only the thread that triggers the GC by failing an allocation will be at a GC point. Other threads must be rolled forward to their next GC point before the GC can take place. We compare, in the context of a high-performance Java^TM virtual machine, two approaches to advancing threads to a GC point, polling and code patching, while keeping all other factors constant. Code patching outperforms polling by an average of 4.7% and sometimes by as much as 11.2%, while costing only slightly more compiled code space. Put differently, since most programs spend less than 1/5 of the time in GC, a 4.7% bottom-line speedup amounts to more than a 20% reduction in the GC-related costs. Patching is, however, more di...
Do object-oriented languages need special hardware support
- In ECOOP ’95 - Object-Orented Programming
, 1995
"... Abstract. Previous studies have shown that object-oriented programs have different execution characteristics than procedural programs, and that special object-oriented hardware can improve performance. The results of these studies may no longer hold because compiler optimizations can remove a large ..."
Abstract
-
Cited by 15 (0 self)
- Add to MetaCart
Abstract. Previous studies have shown that object-oriented programs have different execution characteristics than procedural programs, and that special object-oriented hardware can improve performance. The results of these studies may no longer hold because compiler optimizations can remove a large fraction of the differences. Our measurements show that SELF programs are more similar to C programs than are C++ programs, even though SELF is much more radically object-oriented than C++ and thus should differ much more from C. Furthermore, the benefit of tagged arithmetic instructions in the SPARC architecture (originally motivated by Smalltalk and Lisp implementations) appears to be small. Also, special hardware could hardly reduce message dispatch overhead since dispatch sequences are already very short. Two generic hardware features, instruction cache size and data cache write policy, have a much greater impact on performance. 1
The Impact of Interprocedural Class Analysis on Optimization
, 1995
"... The runtime performance of object-oriented languages often suffers due to the overhead of dynamic dispatching. In order to make these languages competitive with traditional languages, optimizing compilers attempt to eliminate as many of the dynamic dispatches as possible. A variety of local and intr ..."
Abstract
-
Cited by 12 (4 self)
- Add to MetaCart
The runtime performance of object-oriented languages often suffers due to the overhead of dynamic dispatching. In order to make these languages competitive with traditional languages, optimizing compilers attempt to eliminate as many of the dynamic dispatches as possible. A variety of local and intraprocedural techniques have been developed to do this, but they can be ineffective when they are unable to statically bind and inline a message send. To enable better analysis across noninlined message sends, interprocedural analysis is required. In this paper we describe a simple algorithm for interprocedural class analysis and empirically evaluate its effectiveness as a tool for program optimization. We demonstrate that interprocedural class analysis can substantially decrease application execution times when compared to applications optimized with only intraprocedural techniques. * 1 Introduction Applications written in object-oriented languages often perform poorly when compared to equ...

