CUMULATIVE_ARGS in hooks (Was: RFC: semi-automatic hookization)

Joern Rennecke amylaar@spamcop.net
Wed Nov 17 15:45:00 GMT 2010


Quoting Ian Lance Taylor <iant@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.



More information about the Gcc mailing list