Authors
Karel Driesen, Urs Hölzle
Publication date
1996/10/1
Book
Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Pages
306-323
Description
We study the direct cost of virtual function calls in C++ programs, assuming the standard implementation using virtual function tables. We measure this overhead experimentally for a number of large benchmark programs, using a combination of executable inspection and processor simulation. Our results show that the C++ programs measured spend a median of 5.2% of their time and 3.7% of their instructions in dispatch code. For "all virtuals" versions of the programs, the median overhead rises to 13.7% (13% of the instructions). The "thunk" variant of the virtual function table implementation reduces the overhead by a median of 21% relative to the standard implementation. On future processors, these overheads are likely to increase moderately.
Total citations
199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320241681316128584127751041791293884412432
Scholar articles
K Driesen, U Hölzle - Proceedings of the 11th ACM SIGPLAN conference on …, 1996