Re: Method call overhead
> On Jun 3, 2015, at 00:50, Michael Wallner <[email protected]> wrote:
>
>>> On 03 06 2015, at 05:30, Bishop Bettini <[email protected]> wrote:
>>
>> My question though is on relative times. Method call overhead is
>> consistently 50% to 150% over a direct call. Is my experiment invalid, or
>> is this overhead expected? Is the overhead in the allocation,
>> deallocation, GC?
>
> I’suggest you use a tool like valgrind’s callgrind (and visualize with e.g. kcachegrind).
>
I'd also take variable function calling out of the picture (or at least, have it as a separate
dimension). Normal applications make pretty spare use of variable functions (compared to actual
direct calls), whereas your benchmark uses them exclusively. So you've explicitly chosen the
most pessimistic path, and an unrepresentative one.
-Sara
Thread (12 messages)