3 ms·
You only pay for the indirection for virtual functions. You don't pay it simply for choosing C++. There is no "much larger memory structure" either. The vtable
by psyc 9y ago
You only pay for the indirection for virtual functions. You don't pay it simply for choosing C++. There is no "much larger memory structure" either. The vtable is per class. The per object cost is one pointer. C++ compilers are pretty smart.