4 ms·
Just 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
by kaba0 5y ago
Just 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.