The direct cost of virtual function calls in C++

57Citations
Citations of this article
35Readers
Mendeley users who have this article in their library.

Abstract

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. © 1996 ACM.

Cite

CITATION STYLE

APA

Driesen, K., & Hölzle, U. (1996). The direct cost of virtual function calls in C++. SIGPLAN Notices (ACM Special Interest Group on Programming Languages), 31(10), 306–323. https://doi.org/10.1145/236338.236369

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free