Introduction to OOP Chapter 27: Implementation : next previous audio real text

Elimination of Virtual Calls

Even though the overhead of a virtual call is small, it can still add up.

If the (dynamic) class of the receiver is know, a virtual call can simply become an ordinary procedure call

Good optimizing compilers spend a considerable amount of time tracing possible execution flows to gather this information.

Sometimes methods can even be expanded in-line at the point of call.

Intro OOP, Chapter 27, Slide 16