Quoting Ian Lance Taylor <i...@google.com>:

The scheme that Paolo describes avoids virtual functions.  But for this
usage I personally would prefer virtual functions, since there is no
efficiency cost compared to a target hook.

Well, actually, there is: you first fetch the object pointer, then you
find the vtable pointer, and then you load the function pointer.

With the target hook, you load the function pointer.

And with the function-name-valued macro, you directly call the function.

Does it matter?  I don't know, but I would guess it doesn't.

Reply via email to