News for hackers. Stuff that matters.
Re:The cost of dynamic vs. static dispatch in C++ (2013) by kazinator on Saturday February 28, 2015 @08:27PM (#9125682)
Some virtual calls cannot be converted to static calls and inlined, because dynamic dispatch solves a problem which static calls do not solve. In that case, it is a bicycle versus canoe comparison.

C++ does a good job of inlining those calls to virtual functions that can be inlined: like when a virtual is invoked on an object whose exact type is obvious from the scope.

There are no comments on this comment yet.