On Thu, 03 May 2012 16:22:56 -0400, Gor Gyolchanyan <[email protected]> wrote:

That workaround is pretty obvious, but I can't afford to make an extra
call every time. This event system is supposed to be ultra-fast. Isn't
there a way to get to the vtable etry itself?

Well, you can use the ABI to determine the __vtbl location, but I'm not sure if there's a way in compile-time to get the __vtbl index to use. I suppose you could iterate over the vtbl entries and find the function that matches. It would be O(n) to construct the call function, but O(1) to call it.

-Steve

Reply via email to