Empirical Study of Object-Layout Strategies and Optimization Techniques

  • Authors:
  • Natalie Eckel;Joseph Gil

  • Affiliations:
  • -;-

  • Venue:
  • ECOOP '00 Proceedings of the 14th European Conference on Object-Oriented Programming
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

Although there is a large body of research on the time overhead of object oriented programs, there is little work on memory overhead. This paper takes an empirical approach to the study of this overhead, which turns out to be significant in the presence of multiple inheritance. We study the performance, in terms of overhead to object size of three compilation strategies: separate compilation, whole program analysis, and user annotations as done in C++. A variant to each such strategy is the inclusion of pointers to indirect virtual bases in objects. Using a database of several large multiple inheritance hierarchies, spanning 7000 classes, several application domains and different programming languages we find that in all strategies there are certain classes which give rise a large number of compiler generated fields in their object layout. We then study the efficacy of the recently introduced inlining and bidirectional object layout optimization techniques, and show that an average saving of close to 50% in this overhead can be achieved.