News for hackers. Stuff that matters.
Re:The cost of dynamic vs. static dispatch in C++ by pmjordan on Thursday December 05, 2013 @01:09PM (#6855964)
You may be thinking of this: IIRC the standard recommends that compilers omit dynamic dispatch when the dynamic type is known at compile time - this essentially boils down to the case where a virtual method call follows creation of the object with 'new' or as an automatic variable. In my experience, this is commonly implemented correctly in compilers.

The other case where the dynamic type is known is in the constructor itself of course.

There are no comments on this comment yet.