On Wednesday, 21 November 2018 at 03:05:07 UTC, Neia Neutuladh wrote:

Virtual function calls have to do a dereference to figure out which potentially overrided function to call.

"have to do a dereference" in terms of "dereference" as language semantic: yes. "have to do a dereference" in terms of "dereference" as reading from memory: no. If you have proof of the runtime type of an object, then you can use that information to have the CPU call the overrided function directly without reading from memory.

-Johan

Reply via email to