virtual method pointer

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Fri May 4 07:16:38 PDT 2012


Yes! Your solution looks exactly like what I wanted. The reason why I
considered additional alternatives is because your solutions looks
very fast (YES!!!), but not very portable and safe, so after testing,
if it turns out to be inconsistent, I'll have to use something else.

On Fri, May 4, 2012 at 6:12 PM, Mehrdad <wfunction at hotmail.com> wrote:
> Did you see my solution? I think it's what you're looking for...
>
>
> On Friday, 4 May 2012 at 10:05:54 UTC, Gor Gyolchanyan wrote:
>>
>> So, the only overhead in making a virtual call this way over calling
>> the method directly is exactly 1 extra function call?
>>
>> On Fri, May 4, 2012 at 2:02 PM, jerro <a at a.com> wrote:
>>>
>>> On Friday, 4 May 2012 at 09:51:51 UTC, Gor Gyolchanyan wrote:
>>>>
>>>>
>>>> Does this have an overhead over calling virtual method directly?
>>>
>>>
>>>
>>> If you call the function directly, it probably gets inlined.
>>> If you call it through a function pointer, it does have some
>>> overhead over calling the virtual method directly.
>
>
>



-- 
Bye,
Gor Gyolchanyan.


More information about the Digitalmars-d mailing list