77 961
Assignments Done
Successfully Done
In August 2019

Answer to Question #544 in C++ for Neddy

Question #544
Why it is considered that the virtual functions are slow?
Expert's answer
It is so, because the additional time is spent for the search of the desired function address. Each object has a pointer to a virtual function table. This table is looked for the needed function and the detected function is called. In fact, the losses are not so great. New compilers are very good in optimizing the storage addresses of the virtual functions and their search. And even in the new processors some changes were made in order to make a call of the function from the indirect address faster.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions