Why does nobody seem to think that `null` is a serious problem in D?
Johan Engelen
j at j.nl
Wed Nov 21 22:36:50 UTC 2018
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
More information about the Digitalmars-d-learn
mailing list