Performance test of short-circuiting AliasSeq
Stefan Koch
uplink.coder at googlemail.com
Tue Jun 2 09:19:57 UTC 2020
On Tuesday, 2 June 2020 at 06:52:00 UTC, Walter Bright wrote:
> On 6/1/2020 1:23 PM, Stefan Koch wrote:
>> TLDR; Performance patch caused a slowdown.
>> Why? Because the checking for the case which it wants to
>> optimize takes more time than you safe by optimizing it.
>
> You'll need a finer grained profile to reach this conclusion
> than the gross measurement of the compiler runtime. I suggest
> using Vtune.
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.
In this case finer grained analysis is of course needed to do a
100% definite statement, however the measurement itself is quite
telling.
Your short-circuiting patch was the only thing that changed
between the versions.
I do have a fully instrumented version of dmd.
I know exactly which functions spends how much time processing
which symbol.
I will post those results soon.
More information about the Digitalmars-d
mailing list