Performance test of short-circuiting AliasSeq

Stefan Koch uplink.coder at googlemail.com
Tue Jun 2 09:48:47 UTC 2020


On Tuesday, 2 June 2020 at 09:28:48 UTC, FeepingCreature wrote:
> On Tuesday, 2 June 2020 at 09:19:57 UTC, Stefan Koch wrote:
>> Vtune doesn't do intrusive profiling as far as I know.
>> Therefore it's measurements _can_ miss functions which are 
>> called often,
>> but are very short running.
>> A profile  obtained by periodic sampling is has the potential 
>> of misrepresenting the situation.
>>
>
> I don't see how this can be.
>
> A sampling profiler doesn't rely on any sort of program 
> breakpointing. Be the function long-running or short-running, 
> if it's active 1% of the time it will (on net) show up on 1% of 
> sampled backtraces, and so on. To my best understanding, the 
> only way a function can fail to be visible if it's (depending 
> on sample density, more or less) irrelevant to the total 
> runtime. (Or it's invisibly inlined.)

You are correct.
Given a uniform program execution and very fine grained sampling 
i.e. sampling breaks in a sub microsecond interval, you get an 
understanding of where the program spends it's time overall. In a 
quite detailed matter.

However because you frequently interrupting execution in short 
intervals you are also changing the execution profile.
Making your results potentially inaccurate.


More information about the Digitalmars-d mailing list