Eliminating virtual function calls in C++ programs

We have designed and implemented an optimizing source-to-source C++ compiler that reduces the frequency of virtual function calls. Our prototype implementation demonstrates the value of OO-specific optimization for C++. Despite some limitations of our system, and despite the low frequency of virtual...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Aigner, Gerald, Hölzle, Urs
Format: Buchkapitel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:We have designed and implemented an optimizing source-to-source C++ compiler that reduces the frequency of virtual function calls. Our prototype implementation demonstrates the value of OO-specific optimization for 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 large C++ applications totalling over 90,000 lines of code by a median of 18% over the original programs and reduces the number of virtual function calls by a median factor of five. For more call-intensive versions of the same programs, performance improved by a median of 26% and the number of virtual calls dropped by a factor of 17.5. Our measurements indicate that inlining barely increases code size, and that for most programs, the instruction cache miss ratio does not increase significantly.
ISSN:0302-9743
1611-3349
DOI:10.1007/BFb0053060