3 ms·
Yes and speaking of c++ the v table pointer might destroy your cache line.
by andi999 5y ago
Yes and speaking of c++ the v table pointer might destroy your cache line.
- kaba0 5y agoJust as a note, one may get horrified at the cost of all these indirections, C code is full of function pointers passed as callbacks. Hell, actually there is no much difference between a vtable and typical C code doing the same thing. Chances are, C++ compiler writers made it more efficient. Also, c++ doesn’t default to virtual so you rarely pay the price.