Fortunately, in many cases the context of the call narrows the space of addresses which may be selected. It is possible that we get only one suitable address. Then there is no need to search for appropriate routine address at run time. This address may be evaluated at compile time and dynamic call may be replaced by direct one. Let us consider one significant concept of object-oriented approach.
Objects can change their state only via calls to the methods.
Useless code elimination Object-oriented approach provides more flexibility basing on implementation overhead. Fortunately, there are a few constructions which would bring to huge amount of code in the case of direct code generation, but which do not affect program results. Assertions are provided by the programmer only for robustness of the program. They improve source readability and help to debug first versions of the program. Constant expressions folding is a traditional optimization in procedural languages.